Gregory Nutt
a680553f35
net/tcp/tcp_netpoll.c: Add logic to receive notifications when IOBs are freed (Needs CONFIG_NET_TCP_WRITE_BUFFERS and CONFIG_IOB_NOTIFIER). At present, does nothing because the logic in in psock_tcp_cansend() does not check for the availability of IOBs. That will change.
2018-09-12 06:40:18 -06:00
David Sidrane
4a1b8e5825
Merged in david_s5/nuttx/master_kinetis_i2c_reset_hf (pull request #718 )
...
kinetis:i2c On faild reset re-init i2c and clocking
If a reset fails, we still must reinitializes the
i2c block so that subsequent transfers will not
cause a hardfault due to the clock being off.
If that transfer fails it can try to reset
again.
Approved-by: GregoryN <gnutt@nuttx.org>
2018-09-11 22:14:37 +00:00
Gregory Nutt
884ee6e43e
net/tcp and net/udp: In the POLLOUT poll logic, request an immediate Tx poll from the network device bound to the socket. This obviously cannot work if there is not single device bound to the network device.
2018-09-11 10:31:11 -06:00
Gregory Nutt
11a635dcb3
mm/iob: IOB free notifier should accept the work queue ID as a paramter. The notification may need to run on either the high- or low- priority work queue. sched/work: Change the default priority of the low-priority work queue to 100.
2018-09-11 08:49:39 -06:00
EunBong Song
91aa26774b
This patch prevent heap corruption as in below case.
...
TASK A TASK B
malloc()
mm_takesemaphore()
heap holder is set to TASK B
<--- preempt
...
task_exit()
Set to current task to
TASK B
Try to release tcb, and
stack memory
free()
mm_takesemaphore()
- Successfully obtain
semaphore because current
task and heap holder is
same.
Free memory....
Heap corrupt.
This change forces all de-allocations via sched_kfree() and sched_ufree()
to be delayed. Eliminating the immediate de-allocation prevents the
above problem with the the re-entrant semaphore because the deallocation
always occurs on the worker thread, never on TASK B.
There could be consequences in the timing of memory availability. We
will see.
2018-09-11 08:17:33 -06:00
Xiang Xiao
c24fdb3ada
configs: Fix build error caused by commit 459d9f2851
2018-09-11 07:24:29 -06:00
Gregory Nutt
af0ee3c8f7
sched/wqueue: Add an option to work queue notifier so that the notification can occur on different work queues.
2018-09-11 07:22:23 -06:00
Gregory Nutt
39df7ed0c0
mm/iob and sched/semaphore: Work around some issues with the IOB throttle semaphore. It has some odd behaviors that can cause assertions in sem_post(). Also, it seems to get outside of its range occasionally. Need to REVISIT this.
2018-09-10 11:32:09 -06:00
Gregory Nutt
53930763f4
sched/sched/sched_waitpid.c: Remove a bad error check. I though Juha already removed this problem. Did I lose his change?
2018-09-10 06:57:12 -06:00
Gregory Nutt
4cb61bd8c2
sched/wqueue: Notifier design cleanup. The original concept used pre-allocated notification data structures. However, the notification dat must persist for an indeterminate amount of time. So the design was modified to use dynamically allocted data structures. This commit simplifies the design by removed some residual 'machinery' that is no longer needed.
2018-09-10 06:29:51 -06:00
Jakob Haufe
fe4790ec18
Merged in sur5r/nuttx-nuttx/lpc43_eth_pins (pull request #717 )
...
arch/arm/src/lpc43xx: Fix ethernet TX_EN pin definitions
TX_EN on LPC43xx can be routed via P0.1 and PC.4 in both
MII and RMII mode.
Before, P0.1 was hardcoded for MII and PC.4 was hardcoded for RMII.
Also, the definitions used inconsistent naming (TXEN vs. TX_EN).
Approved-by: GregoryN <gnutt@nuttx.org>
2018-09-10 11:56:52 +00:00
Gregory Nutt
09d5d05b95
net/TCP: Extend the TCP notification logic logic so that it will also report loss of connection events.
2018-09-09 17:32:10 -06:00
Gregory Nutt
9d3148406c
Signals were not a good choice of IPC to implement the poll function for several reasons: In order to handle the asynchrnous poll-related event, a substantial amount of state information is needed. Signals are only capable of passing minimal amounts of data. There are also complexities with performing kernel space signal handlers in kernel space code that is better to avoid. So, instead of signals, the equivalent logic was converted to run via a callback that executes on the high-priority work queue.
...
Squashed commit of the following:
Fix up some final compile isses.
net/netdev: Convert the network down notification logic to use the new wqueue-based notification factility.
net/udp: Convert the UDP readahead notification logic to use the new wqueue-based notification factility.
net/tcp: Convert the TCP readahead notification logic to use the new wqueue-based notification factility.
mm/iob: Convert the IOB notification logic to use the new wqueue-based notification factility.
sched/wqueue: Signals are not good IPCs to support the target poll functionality for several reasons including the amount of data that can be passed with a signal and in the fact that in protected and kernel modes, user threads executing signal handlers in protected, kernel memory is problematic. Instead, convert the same logic to perform the notifications via function callback on the high priority work queue.
2018-09-09 15:01:44 -06:00
Gregory Nutt
20814acad2
sched/signal: In signal notification facility, use sigqueue() to notify vs. kill(). With sigqueue, we can pass more info (but still not enough).
2018-09-09 11:57:25 -06:00
Gregory Nutt
32e3e51678
net/netdev: Add signal notification for the case where the network goes down.
2018-09-09 10:39:25 -06:00
Gregory Nutt
28f73bd928
net/tcp and udp: Add logic to signal events when TCP or UDP read-ahead data is buffered.
...
Squashed commit of the following:
net/tcp: Add signal notification for the case when UDP read-ahead data is buffered. This is basically of clone of the TCP notification logic with naming adapted for UDP.
net/tcp: Add signal notification for the case when TCP read-ahead data is buffered.
2018-09-09 09:21:39 -06:00
Gregory Nutt
fc127fd297
sched/signal: Add a generic signal notification facility. Modify the custom IOB available notifier so that it is now just a wrapper around this generic signal notification. This generic signal notification faility will, eventually, be used to support network polling.
...
Squashed commit of the following:
mm/iob: The IOB available notifier is now just a wrapper around the common signal notifier.
sched/signal: Add a generic signal notification facility.
sched/signal/sig_evthread.c: More trivial naming changes.
sched/signal: Rename nxsig_notification() to nxsig_evthread() to make forthcoming naming additions more consistent.
2018-09-09 08:32:37 -06:00
Gregory Nutt
0eb1beee63
mm/iob: Improve the IOB notifier data structures. Replace the fixed array with a singly linked list. For small value of CONFIG_IOB_NWAITERS, either solution is fine. But the fixed array does not scale well when CONFIG_IOB_NWAITERS is large.
2018-09-08 17:47:43 -06:00
Gregory Nutt
5bd0f596fc
Fix some trivial typos.
2018-09-08 16:53:12 -06:00
Gregory Nutt
bba8541ad6
mm/iob: Add an IOB notifier that will send a signal to any registered threads that want to be notified when an IOB has been freed. This is an untested work-in-progress and is intended to be a part of a larger solution to correctly handling network poll operations.
2018-09-08 11:21:18 -06:00
Gregory Nutt
ddaea5dabc
Revise commit cce9ae94f4
: The pass1/ directly only needs to be added to the directories to be cleaned. That would be OTHERDIRS vs. NONFSFIRS. Also remove old reference to the defunct lib directory (now the staging directory).
2018-09-08 08:28:02 -06:00
Gregory Nutt
cce9ae94f4
tools/Directories.mk: The pass1 directory was not being cleaned on 'make distclean'
2018-09-08 08:11:38 -06:00
Gregory Nutt
9479ad54f9
Update of Documents/NuttX.html in preparation for the 7.26 release.
2018-09-08 06:56:01 -06:00
Gregory Nutt
fa5822f255
Partial update of Documents/NuttX.html in preparation for the 7.26 release. There is still more to be done.
2018-09-07 15:35:45 -06:00
Gregory Nutt
bb5a6f372e
Update ReleaseNotes in preparation for the 7.26 release.
2018-09-07 13:17:12 -06:00
Gregory Nutt
cbb9223f4e
Update ChangeLog in preparation for 7.26 release.
2018-09-06 12:03:41 -06:00
Gregory Nutt
891b2646da
configs/: apps/netutils/ping has been removed. Ping support is now provided by apps/system/ping. Remove references to -CONFIG_NETUTILS_PING or change them to CONFIG_SYSTEM_PING with CONFIG_NET_ICMP_SOCKET=y
2018-09-05 14:56:09 -06:00
Gregory Nutt
33e3fb7a70
Correct mispellings of pseudo. Update some comments in signal.h.
2018-09-05 11:56:14 -06:00
Goden Freemans
9348f600ee
arch/arm/src/stm32l4: Add getstatus and getperiod method to the timer driver (includes coding standard changes made prior to commit)
2018-09-05 08:48:24 -06:00
Gregory Nutt
b7d1f13a54
b/sched/sched/sched_waitpid.c: Remove options check in DEBUG_FEATURES
2018-09-05 06:45:49 -06:00
Gregory Nutt
3611aefd14
tools/mkexport.sh: Save the name of the STRIP tool too.
2018-09-04 17:18:16 -06:00
Gregory Nutt
e88759e53d
Update a README.
2018-09-04 16:48:34 -06:00
Gregory Nutt
b7726df9f7
tools/Makefile.unix: Was not cleaning up export directory if it was left from a failed export. configs/sama5d4-ek/README.txt: Update.
2018-09-04 13:19:17 -06:00
Juha Niskanen
069e9b899c
arch/arm/src/stm32f7: Port the low-level PM functions to STM32F7.
2018-09-04 07:18:12 -06:00
Goden Freemans
b7bec7f064
configs/b-l475e-iot01a/src: Add timer driver support.
2018-09-04 07:13:03 -06:00
Gregory Nutt
820a6c4e39
configs/b-l475e-iot01a/src: Fix copy paste errors in names: stm32_bringup->stm32l4_bringup. Noted by Freemans Goden.
2018-09-04 06:54:58 -06:00
Gregory Nutt
ab5ebc5498
Revert "tools/KernelLibs.mk: Force libproxies to be built and installed before applications are build. Otherwise, the applications will not be able to find libproxies. I don't know why this was never seen before. Must be due to recent changes in the apps/ directory. The change is correct in any event."
...
This reverts commit f7eee58aee
.
2018-09-03 16:27:54 -06:00
Gregory Nutt
f7eee58aee
tools/KernelLibs.mk: Force libproxies to be built and installed before applications are build. Otherwise, the applications will not be able to find libproxies. I don't know why this was never seen before. Must be due to recent changes in the apps/ directory. The change is correct in any event.
2018-09-03 13:34:41 -06:00
Gregory Nutt
152ccbd447
configs/olimex-stm32-p407/dhtxx: Fix defconfig file. It was based on an older, incompatible version of NuttX.
2018-09-03 09:42:04 -06:00
Gregory Nutt
993321dda6
drivers/serial: Add support for Ctrl-Z. This works just like the recently added Ctrl-C support except that SIGSTP is sent when the Ctrl-Z characters is encountered vs. SIGINT.
2018-09-02 15:36:25 -06:00
Gregory Nutt
093348030e
sched/: Update signal default STOP action. If waitpid was called with the WUNTRACED then wake up waitpid. Also fix some compile problems.. How did this work before?
2018-09-02 13:51:52 -06:00
Gregory Nutt
a6f9c6215d
Update some comments
2018-09-02 12:34:45 -06:00
Gregory Nutt
5c5b6ab8f6
arch/arm/src/stm32h7: Remove old references to RXDMA. Add configuration option to select the Rx FIFO threshold level.
2018-09-02 08:35:22 -06:00
Gregory Nutt
ff1e6a66e9
configs/metro-m4: Fix problem with SysTick timer running too fast. This turned out to be a dumb typo in board.h that was providing the wrong CPU frequency to the SysTick setup logic.
2018-09-02 07:31:16 -06:00
Gregory Nutt
9f6383e5fd
configs/metro-m4: Verify the CMCC and enable it by default in the NSH configuration.
2018-09-01 17:03:31 -06:00
Gregory Nutt
f66869b793
configs/metro-m4: Update the NSH configuration.
2018-09-01 15:58:24 -06:00
Gregory Nutt
aee1c39eab
configs/metro-m4: Fix RxD interrupt pin selection. The number SERCOM interrupts do not refer to PAD numbers, but to bit positions in the INFLAG register (very tiny footnote in the data sheet). With with final fix, the basic NSH configuration appears fully functional.
2018-09-01 15:29:22 -06:00
Gregory Nutt
6ada0e10ba
configs/metro-m4: Fix RxD PAD selection. Add a configuration option to use OSCULP32K instead of XOSC32K.
2018-09-01 14:38:19 -06:00
Gregory Nutt
1e4272a046
arch/arm/src/samd5e5: Correct some bad addresses in the memory map.
2018-09-01 11:15:16 -06:00
Gregory Nutt
e3d7fcf7ab
arch/arm/src/samd5e5/sam_lowputc.c: Only the console USART was begin enabled.
2018-09-01 10:29:09 -06:00