mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 06:42:32 +08:00
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.
This commit is contained in:
@@ -68,6 +68,9 @@
|
||||
#ifndef CONFIG_DISABLE_PTHREAD
|
||||
# include "pthread/pthread.h"
|
||||
#endif
|
||||
#ifdef CONFIG_SCHED_WORKQUEUE
|
||||
# include "wqueue/wqueue.h"
|
||||
#endif
|
||||
#include "clock/clock.h"
|
||||
#include "timer/timer.h"
|
||||
#include "irq/irq.h"
|
||||
@@ -702,6 +705,12 @@ void os_start(void)
|
||||
net_setup();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SCHED_WORKQUEUE
|
||||
/* Initialize work queue data structures */
|
||||
|
||||
work_initialize();
|
||||
#endif
|
||||
|
||||
/* The processor specific details of running the operating system
|
||||
* will be handled here. Such things as setting up interrupt
|
||||
* service routines and starting the clock are some of the things
|
||||
|
||||
Reference in New Issue
Block a user