From b58281cab8add0af82167282126132b069170dd6 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 12 Jan 2013 19:58:45 +0000 Subject: [PATCH] Fix a *critical* bug in the task exit logic. Implements SIGCHILD git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5513 42af7a65-404d-4744-a932-0658087f49c3 --- apps/ChangeLog.txt | 2 + apps/examples/ostest/sighand.c | 58 ++++++++++++++++ nuttx/ChangeLog | 11 +++ nuttx/Documentation/NuttxPortingGuide.html | 50 ++++++++++++-- nuttx/configs/README.txt | 24 ++++++- nuttx/configs/amber/hello/defconfig | 2 +- nuttx/configs/avr32dev1/nsh/defconfig | 2 +- nuttx/configs/avr32dev1/ostest/defconfig | 2 +- nuttx/configs/cloudctrl/nsh/defconfig | 2 +- nuttx/configs/demo9s12ne64/ostest/defconfig | 2 +- nuttx/configs/ea3131/nsh/defconfig | 2 +- nuttx/configs/ea3131/ostest/defconfig | 2 +- nuttx/configs/ea3131/pgnsh/defconfig | 2 +- nuttx/configs/ea3131/usbserial/defconfig | 2 +- nuttx/configs/ea3131/usbstorage/defconfig | 2 +- nuttx/configs/ea3152/ostest/defconfig | 2 +- nuttx/configs/fire-stm32v2/nsh/defconfig | 2 +- nuttx/configs/hymini-stm32v/buttons/defconfig | 2 +- nuttx/configs/hymini-stm32v/nsh/defconfig | 2 +- nuttx/configs/hymini-stm32v/nsh2/defconfig | 2 +- nuttx/configs/hymini-stm32v/nx/defconfig | 2 +- nuttx/configs/hymini-stm32v/nxlines/defconfig | 2 +- .../configs/hymini-stm32v/usbserial/defconfig | 2 +- .../hymini-stm32v/usbstorage/defconfig | 2 +- nuttx/configs/kwikstik-k40/ostest/defconfig | 2 +- nuttx/configs/lincoln60/nsh/defconfig | 2 +- nuttx/configs/lincoln60/ostest/defconfig | 2 +- nuttx/configs/lpc4330-xplorer/nsh/defconfig | 2 +- .../configs/lpc4330-xplorer/ostest/defconfig | 2 +- .../lpcxpresso-lpc1768/dhcpd/defconfig | 2 +- .../configs/lpcxpresso-lpc1768/nsh/defconfig | 2 +- nuttx/configs/lpcxpresso-lpc1768/nx/defconfig | 2 +- .../lpcxpresso-lpc1768/ostest/defconfig | 2 +- .../lpcxpresso-lpc1768/thttpd/defconfig | 2 +- .../lpcxpresso-lpc1768/usbstorage/defconfig | 2 +- nuttx/configs/mbed/hidkbd/defconfig | 2 +- nuttx/configs/mbed/nsh/defconfig | 2 +- nuttx/configs/micropendous3/hello/defconfig | 2 +- nuttx/configs/mirtoo/nsh/defconfig | 2 +- nuttx/configs/mirtoo/nxffs/defconfig | 2 +- nuttx/configs/mirtoo/ostest/defconfig | 2 +- nuttx/configs/ne64badge/ostest/defconfig | 2 +- nuttx/configs/nucleus2g/nsh/defconfig | 2 +- nuttx/configs/nucleus2g/ostest/defconfig | 2 +- nuttx/configs/nucleus2g/usbserial/defconfig | 2 +- nuttx/configs/nucleus2g/usbstorage/defconfig | 2 +- .../configs/olimex-lpc1766stk/ftpc/defconfig | 2 +- .../olimex-lpc1766stk/hidkbd/defconfig | 2 +- .../olimex-lpc1766stk/nettest/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/nsh/defconfig | 2 +- nuttx/configs/olimex-lpc1766stk/nx/defconfig | 2 +- .../olimex-lpc1766stk/ostest/defconfig | 2 +- .../olimex-lpc1766stk/slip-httpd/defconfig | 2 +- .../olimex-lpc1766stk/thttpd/defconfig | 2 +- .../olimex-lpc1766stk/usbserial/defconfig | 2 +- .../olimex-lpc1766stk/usbstorage/defconfig | 2 +- nuttx/configs/olimex-stm32-p107/nsh/defconfig | 2 +- .../olimex-stm32-p107/ostest/defconfig | 2 +- .../configs/olimex-strp711/nettest/defconfig | 2 +- nuttx/configs/pcblogic-pic32mx/nsh/defconfig | 2 +- .../configs/pcblogic-pic32mx/ostest/defconfig | 2 +- nuttx/configs/pic32-starterkit/nsh/defconfig | 2 +- nuttx/configs/pic32-starterkit/nsh2/defconfig | 2 +- .../configs/pic32-starterkit/ostest/defconfig | 2 +- nuttx/configs/pic32mx7mmb/nsh/defconfig | 2 +- nuttx/configs/pic32mx7mmb/ostest/defconfig | 2 +- nuttx/configs/sam3u-ek/knsh/defconfig | 2 +- nuttx/configs/sam3u-ek/nsh/defconfig | 2 +- nuttx/configs/sam3u-ek/nx/defconfig | 2 +- nuttx/configs/sam3u-ek/ostest/defconfig | 2 +- nuttx/configs/sam3u-ek/touchscreen/defconfig | 2 +- nuttx/configs/shenzhou/nsh/defconfig | 2 +- nuttx/configs/shenzhou/nxwm/defconfig | 2 +- nuttx/configs/shenzhou/thttpd/defconfig | 2 +- nuttx/configs/sim/nsh/defconfig | 2 +- nuttx/configs/sim/nsh2/defconfig | 2 +- nuttx/configs/sim/ostest/defconfig | 13 +++- nuttx/configs/stm3210e-eval/RIDE/defconfig | 2 +- nuttx/configs/stm3210e-eval/buttons/defconfig | 2 +- .../configs/stm3210e-eval/composite/defconfig | 2 +- nuttx/configs/stm3210e-eval/nsh/defconfig | 2 +- nuttx/configs/stm3210e-eval/nsh2/defconfig | 2 +- nuttx/configs/stm3210e-eval/nx/defconfig | 2 +- .../configs/stm3210e-eval/nxconsole/defconfig | 2 +- nuttx/configs/stm3210e-eval/nxlines/defconfig | 2 +- nuttx/configs/stm3210e-eval/nxtext/defconfig | 2 +- nuttx/configs/stm3210e-eval/ostest/defconfig | 2 +- nuttx/configs/stm3210e-eval/pm/defconfig | 2 +- .../configs/stm3210e-eval/usbserial/defconfig | 2 +- .../stm3210e-eval/usbstorage/defconfig | 2 +- nuttx/configs/stm3220g-eval/dhcpd/defconfig | 2 +- nuttx/configs/stm3220g-eval/nettest/defconfig | 2 +- nuttx/configs/stm3220g-eval/nsh/defconfig | 2 +- nuttx/configs/stm3220g-eval/nsh2/defconfig | 2 +- nuttx/configs/stm3220g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3220g-eval/ostest/defconfig | 2 +- nuttx/configs/stm3220g-eval/telnetd/defconfig | 2 +- nuttx/configs/stm3240g-eval/dhcpd/defconfig | 2 +- nuttx/configs/stm3240g-eval/nettest/defconfig | 2 +- nuttx/configs/stm3240g-eval/nsh/defconfig | 2 +- nuttx/configs/stm3240g-eval/nsh2/defconfig | 2 +- .../configs/stm3240g-eval/nxconsole/defconfig | 2 +- nuttx/configs/stm3240g-eval/nxwm/defconfig | 2 +- nuttx/configs/stm3240g-eval/ostest/defconfig | 2 +- nuttx/configs/stm3240g-eval/telnetd/defconfig | 2 +- .../configs/stm3240g-eval/webserver/defconfig | 2 +- .../configs/stm32f100rc_generic/nsh/defconfig | 2 +- nuttx/configs/stm32f4discovery/README.txt | 26 +++++++ nuttx/configs/stm32f4discovery/nsh/defconfig | 2 +- nuttx/configs/stm32f4discovery/pm/defconfig | 2 +- .../stm32f4discovery/posix_spawn/defconfig | 2 +- nuttx/configs/sure-pic32mx/nsh/defconfig | 2 +- nuttx/configs/sure-pic32mx/ostest/defconfig | 2 +- nuttx/configs/sure-pic32mx/usbnsh/defconfig | 2 +- nuttx/configs/teensy/hello/defconfig | 2 +- nuttx/configs/teensy/nsh/defconfig | 2 +- nuttx/configs/teensy/usbstorage/defconfig | 2 +- nuttx/configs/twr-k60n512/nsh/defconfig | 2 +- nuttx/configs/twr-k60n512/ostest/defconfig | 2 +- nuttx/configs/ubw32/nsh/defconfig | 2 +- nuttx/configs/ubw32/ostest/defconfig | 2 +- nuttx/configs/vsn/nsh/defconfig | 2 +- nuttx/include/nuttx/sched.h | 3 + nuttx/include/nuttx/wqueue.h | 2 +- nuttx/include/signal.h | 68 +++++++++++------- nuttx/libc/Kconfig | 5 +- nuttx/sched/Kconfig | 69 ++++++++++++++++--- nuttx/sched/sched_unlock.c | 1 + nuttx/sched/sig_kill.c | 7 ++ nuttx/sched/sig_mqnotempty.c | 7 ++ nuttx/sched/sig_queue.c | 13 +++- nuttx/sched/sig_timedwait.c | 4 ++ nuttx/sched/task_deletecurrent.c | 16 ++++- nuttx/sched/task_exithook.c | 55 +++++++++++++++ nuttx/sched/task_setup.c | 36 +++++++++- nuttx/sched/timer_settime.c | 4 ++ 136 files changed, 540 insertions(+), 164 deletions(-) diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 6b63527a7e..65d4d6134e 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -462,4 +462,6 @@ * apps/examples/wlan: Remove non-functional example. * apps/examples/ostest/vfork.c: Added a test of vfork(). * apps/exampes/posix_spawn: Added a test of poxis_spawn(). + * apps/examples/ostest: Extend signal handler test to catch + death-of-child signals (SIGCHLD). diff --git a/apps/examples/ostest/sighand.c b/apps/examples/ostest/sighand.c index eabfe56464..63d9590d9a 100644 --- a/apps/examples/ostest/sighand.c +++ b/apps/examples/ostest/sighand.c @@ -54,12 +54,32 @@ static sem_t sem; static bool sigreceived = false; static bool threadexited = false; +#ifdef CONFIG_SCHED_HAVE_PARENT +static void death_of_child(int signo, siginfo_t *info, void *ucontext) +{ + /* Use of printf in a signal handler is NOT safe! It can cause deadlocks! */ + + if (info) + { + printf("death_of_child: PID %d received signal=%d code=%d pid=%d status=%d\n", + getpid(), signo, info->si_code, info->si_pid, info->si_status); + } + else + { + printf("death_of_child: PID %d received signal=%d (no info?)\n", + getpid(), signo); + } +} +#endif + static void wakeup_action(int signo, siginfo_t *info, void *ucontext) { sigset_t oldset; sigset_t allsigs; int status; + /* Use of printf in a signal handler is NOT safe! It can cause deadlocks! */ + printf("wakeup_action: Received signal %d\n" , signo); sigreceived = true; @@ -186,6 +206,11 @@ static int waiter_main(int argc, char *argv[]) void sighand_test(void) { +#ifdef CONFIG_SCHED_HAVE_PARENT + struct sigaction act; + struct sigaction oact; + sigset_t sigset; +#endif struct sched_param param; union sigval sigvalue; pid_t waiterpid; @@ -195,6 +220,32 @@ void sighand_test(void) printf("sighand_test: Initializing semaphore to 0\n" ); sem_init(&sem, 0, 0); +#ifdef CONFIG_SCHED_HAVE_PARENT + printf("sighand_test: Unmasking SIGCHLD\n"); + + (void)sigemptyset(&sigset); + (void)sigaddset(&sigset, SIGCHLD); + status = sigprocmask(SIG_UNBLOCK, &sigset, NULL); + if (status != OK) + { + printf("sighand_test: ERROR sigprocmask failed, status=%d\n", + status); + } + + printf("sighand_test: Registering SIGCHLD handler\n" ); + act.sa_sigaction = death_of_child; + act.sa_flags = SA_SIGINFO; + + (void)sigfillset(&act.sa_mask); + (void)sigdelset(&act.sa_mask, SIGCHLD); + + status = sigaction(SIGCHLD, &act, &oact); + if (status != OK) + { + printf("waiter_main: ERROR sigaction failed, status=%d\n" , status); + } +#endif + /* Start waiter thread */ printf("sighand_test: Starting waiter task\n" ); @@ -262,6 +313,13 @@ void sighand_test(void) printf("sighand_test: ERROR signal handler did not run\n" ); } + /* Detach the signal handler */ + +#ifdef CONFIG_SCHED_HAVE_PARENT + act.sa_sigaction = SIG_DFL; + status = sigaction(SIGCHLD, &act, &oact); +#endif + printf("sighand_test: done\n" ); FFLUSH(); } diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 40a24d8f10..921b7014bd 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3911,3 +3911,14 @@ lib_fread() was passed a bad stream. Needed to move the releasing of a semaphore inside of some conditional logic (cosmetic). + * include/nuttx/sched.h, sched/task_setup.c, and sched/task_exithook.c: + Add support for remembering the parent task and sending + SIGCHLD to the parent when the task exists. + * sched/task_exithook.c: Fixed a *critical* bug. Here is + the scenario: (1) sched_lock() is called increments the lockcount + on the current TCB (i.e., the one at the head of the ready to run + list), (2) sched_mergepending is called which may change the task + at the head of the readytorun list, then (2) sched_lock() is called + which decrements the lockcount on the wrong TCB. The failure case + that I saw was that pre-emption got disabled in the IDLE thread, + locking up the whole system. diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index b1664f3f09..0b67eddb74 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@

NuttX RTOS Porting Guide

-

Last Updated: January 4, 2013

+

Last Updated: January 12, 2013

@@ -4480,6 +4480,11 @@ build task name to save in the TCB. Useful if scheduler instrumentation is selected. Set to zero to disable. +
  • + CONFIG_SCHED_HAVE_PARENT: Remember the ID of the parent thread when a new child thread is created. + This support enables a few minor features (such as SIGCHLD) and slightly increases the size of the Task Control Block (TCB) of every task to hold the ID of the parent thread. + Default: disabled. +
  • CONFIG_SYSTEM_TIME16: The range of system time is, by default, 32-bits. @@ -4582,7 +4587,7 @@ build
  • CONFIG_SIG_SIGWORK: The signal number that will be used to wake-up - the worker thread. Default: 4 + the worker thread. Default: 17
  • CONFIG_SCHED_LPWORK: If CONFIG_SCHED_WORKQUEUE is defined, then a single work queue is created by default. @@ -4624,9 +4629,41 @@ build user_start.
  • +

    + Signal Numbers: +

    +

    - Binary Loaders: + Binary Loaders:

    - System Logging: + System Logging:

    - Kernel build options: + Kernel build options:

    - OS setup related to on-demand paging: + OS setup related to on-demand paging:

    + Disabling OS Features. The following can be used to disable categories of APIs supported by the OS. If the compiler supports weak functions, then it should not be necessary to disable functions unless you want to diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index 6e7526ed0e..2724cf5a3c 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -334,6 +334,11 @@ defconfig -- This is a configuration file similar to the Linux CONFIG_TASK_NAME_SIZE - Specifies that maximum size of a task name to save in the TCB. Useful if scheduler instrumentation is selected. Set to zero to disable. + CONFIG_SCHED_HAVE_PARENT - Remember the ID of the parent thread + when a new child thread is created. This support enables a + few minor features (such as SIGCHLD) and slightly increases + the size of the Task Control Block (TCB) of every task to hold + the ID of the parent thread. Default: disabled. CONFIG_START_YEAR, CONFIG_START_MONTH, CONFIG_START_DAY - Used to initialize the internal time logic. CONFIG_GREGORIAN_TIME - Enables Gregorian time conversions. @@ -400,7 +405,7 @@ defconfig -- This is a configuration file similar to the Linux CONFIG_SCHED_WORKSTACKSIZE - The stack size allocated for the worker thread. Default: CONFIG_IDLETHREAD_STACKSIZE. CONFIG_SIG_SIGWORK - The signal number that will be used to wake-up - the worker thread. Default: 4 + the worker thread. Default: 17 CONFIG_SCHED_LPWORK. If CONFIG_SCHED_WORKQUEUE is defined, then a single work queue is created by default. If CONFIG_SCHED_LPWORK is also defined then an additional, lower-priority work queue will also be created. This @@ -426,6 +431,23 @@ defconfig -- This is a configuration file similar to the Linux where 'app' is the application name. If not defined, CONFIG_USER_ENTRYPOINT defaults to user_start. + Signal Numbers: + + CONFIG_SIG_SIGUSR1 - Value of standard user signal 1 (SIGUSR1). + Default: 1 + CONFIG_SIG_SIGUSR2 - Value of standard user signal 2 (SIGUSR2). + Default: 2 + CONFIG_SIG_SIGALARM - Default the standard signal used with POSIX + timers (SIGALRM). Default: 3 + CONFIG_SIG_SIGCHLD - The SIGCHLD signal is sent to the parent of a child + process when it exits, is interrupted (stopped), or resumes after being + interrupted. Default: 4 + + CONFIG_SIG_SIGCONDTIMEDOUT - This non-standard signal number is used in + the implementation of pthread_cond_timedwait(). Default 16. + CONFIG_SIG_SIGWORK - SIGWORK is a non-standard signal used to wake up + the internal NuttX worker thread. Default: 17. + Binary Loaders: CONFIG_BINFMT_DISABLE - By default, support for loadable binary formats is built. diff --git a/nuttx/configs/amber/hello/defconfig b/nuttx/configs/amber/hello/defconfig index 5d028e321c..7e3d4ad70c 100644 --- a/nuttx/configs/amber/hello/defconfig +++ b/nuttx/configs/amber/hello/defconfig @@ -142,7 +142,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for nxflat diff --git a/nuttx/configs/avr32dev1/nsh/defconfig b/nuttx/configs/avr32dev1/nsh/defconfig index 2b66316c31..acca1fbac3 100755 --- a/nuttx/configs/avr32dev1/nsh/defconfig +++ b/nuttx/configs/avr32dev1/nsh/defconfig @@ -168,7 +168,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig index 9b67be09ea..084c662332 100755 --- a/nuttx/configs/avr32dev1/ostest/defconfig +++ b/nuttx/configs/avr32dev1/ostest/defconfig @@ -168,7 +168,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/cloudctrl/nsh/defconfig b/nuttx/configs/cloudctrl/nsh/defconfig index 99c7eb7901..8f145d3ab9 100644 --- a/nuttx/configs/cloudctrl/nsh/defconfig +++ b/nuttx/configs/cloudctrl/nsh/defconfig @@ -273,7 +273,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # CONFIG_SCHED_LPWORK is not set CONFIG_SCHED_WAITPID=y # CONFIG_SCHED_ATEXIT is not set diff --git a/nuttx/configs/demo9s12ne64/ostest/defconfig b/nuttx/configs/demo9s12ne64/ostest/defconfig index 9c9668aacc..79224989f2 100755 --- a/nuttx/configs/demo9s12ne64/ostest/defconfig +++ b/nuttx/configs/demo9s12ne64/ostest/defconfig @@ -142,7 +142,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=256 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/ea3131/nsh/defconfig b/nuttx/configs/ea3131/nsh/defconfig index 735af431b0..8c7b351af4 100644 --- a/nuttx/configs/ea3131/nsh/defconfig +++ b/nuttx/configs/ea3131/nsh/defconfig @@ -141,7 +141,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/ea3131/ostest/defconfig b/nuttx/configs/ea3131/ostest/defconfig index 2f73ad5c9e..19838ceab4 100644 --- a/nuttx/configs/ea3131/ostest/defconfig +++ b/nuttx/configs/ea3131/ostest/defconfig @@ -141,7 +141,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/ea3131/pgnsh/defconfig b/nuttx/configs/ea3131/pgnsh/defconfig index 32f89c5001..1cc2bec7e2 100644 --- a/nuttx/configs/ea3131/pgnsh/defconfig +++ b/nuttx/configs/ea3131/pgnsh/defconfig @@ -156,7 +156,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # OS setup related to on-demand paging: diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig index 3d33a1b67d..a82f69877a 100644 --- a/nuttx/configs/ea3131/usbserial/defconfig +++ b/nuttx/configs/ea3131/usbserial/defconfig @@ -143,7 +143,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/ea3131/usbstorage/defconfig b/nuttx/configs/ea3131/usbstorage/defconfig index 8d9933f555..a957fb3ab8 100644 --- a/nuttx/configs/ea3131/usbstorage/defconfig +++ b/nuttx/configs/ea3131/usbstorage/defconfig @@ -144,7 +144,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/ea3152/ostest/defconfig b/nuttx/configs/ea3152/ostest/defconfig index d85fd58218..6d0bb63f05 100644 --- a/nuttx/configs/ea3152/ostest/defconfig +++ b/nuttx/configs/ea3152/ostest/defconfig @@ -142,7 +142,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index c42bb15696..2660984968 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -266,7 +266,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # CONFIG_SCHED_LPWORK is not set CONFIG_SCHED_WAITPID=y # CONFIG_SCHED_ATEXIT is not set diff --git a/nuttx/configs/hymini-stm32v/buttons/defconfig b/nuttx/configs/hymini-stm32v/buttons/defconfig index bbd6c2319d..e90ded32ad 100644 --- a/nuttx/configs/hymini-stm32v/buttons/defconfig +++ b/nuttx/configs/hymini-stm32v/buttons/defconfig @@ -194,7 +194,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/hymini-stm32v/nsh/defconfig b/nuttx/configs/hymini-stm32v/nsh/defconfig index ca589278af..eeb3b09ffd 100755 --- a/nuttx/configs/hymini-stm32v/nsh/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh/defconfig @@ -192,7 +192,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/hymini-stm32v/nsh2/defconfig b/nuttx/configs/hymini-stm32v/nsh2/defconfig index 5a8c0bea25..ecf4c3a3d8 100644 --- a/nuttx/configs/hymini-stm32v/nsh2/defconfig +++ b/nuttx/configs/hymini-stm32v/nsh2/defconfig @@ -202,7 +202,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/hymini-stm32v/nx/defconfig b/nuttx/configs/hymini-stm32v/nx/defconfig index 28b08582cd..c6e0491420 100644 --- a/nuttx/configs/hymini-stm32v/nx/defconfig +++ b/nuttx/configs/hymini-stm32v/nx/defconfig @@ -193,7 +193,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for NXFLAT diff --git a/nuttx/configs/hymini-stm32v/nxlines/defconfig b/nuttx/configs/hymini-stm32v/nxlines/defconfig index 880efb7d81..fb968c483a 100644 --- a/nuttx/configs/hymini-stm32v/nxlines/defconfig +++ b/nuttx/configs/hymini-stm32v/nxlines/defconfig @@ -197,7 +197,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for NXFLAT diff --git a/nuttx/configs/hymini-stm32v/usbserial/defconfig b/nuttx/configs/hymini-stm32v/usbserial/defconfig index 732c1e8b6f..0c7317a007 100755 --- a/nuttx/configs/hymini-stm32v/usbserial/defconfig +++ b/nuttx/configs/hymini-stm32v/usbserial/defconfig @@ -195,7 +195,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/hymini-stm32v/usbstorage/defconfig b/nuttx/configs/hymini-stm32v/usbstorage/defconfig index 7e49de0e87..16f43a1ce8 100755 --- a/nuttx/configs/hymini-stm32v/usbstorage/defconfig +++ b/nuttx/configs/hymini-stm32v/usbstorage/defconfig @@ -195,7 +195,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for NXFLAT diff --git a/nuttx/configs/kwikstik-k40/ostest/defconfig b/nuttx/configs/kwikstik-k40/ostest/defconfig index 759cff20b0..5f0291cedc 100755 --- a/nuttx/configs/kwikstik-k40/ostest/defconfig +++ b/nuttx/configs/kwikstik-k40/ostest/defconfig @@ -204,7 +204,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/lincoln60/nsh/defconfig b/nuttx/configs/lincoln60/nsh/defconfig index e5009f8d6e..908b01e3a5 100644 --- a/nuttx/configs/lincoln60/nsh/defconfig +++ b/nuttx/configs/lincoln60/nsh/defconfig @@ -181,7 +181,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/lincoln60/ostest/defconfig b/nuttx/configs/lincoln60/ostest/defconfig index 986f9bf438..ea42f57638 100644 --- a/nuttx/configs/lincoln60/ostest/defconfig +++ b/nuttx/configs/lincoln60/ostest/defconfig @@ -187,7 +187,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/lpc4330-xplorer/nsh/defconfig b/nuttx/configs/lpc4330-xplorer/nsh/defconfig index 0afcbae892..78b9e3f715 100644 --- a/nuttx/configs/lpc4330-xplorer/nsh/defconfig +++ b/nuttx/configs/lpc4330-xplorer/nsh/defconfig @@ -227,7 +227,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/lpc4330-xplorer/ostest/defconfig b/nuttx/configs/lpc4330-xplorer/ostest/defconfig index 76d3f11e95..342fe04a08 100644 --- a/nuttx/configs/lpc4330-xplorer/ostest/defconfig +++ b/nuttx/configs/lpc4330-xplorer/ostest/defconfig @@ -224,7 +224,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=n CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig index f56dfca1ba..2e0d2eea66 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -186,7 +186,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for nxflat diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig index ef70b55080..23f375a47a 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -189,7 +189,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig index a0d3cd2836..3f8474103a 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig @@ -191,7 +191,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for nxflat diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig index 660bd6c8b4..10b63eb2d1 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig @@ -184,7 +184,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for nxflat diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig index 7558691560..b6ea25948f 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -186,7 +186,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for nxflat diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig index 004d92cb34..9e4bcb15d6 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig +++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig @@ -187,7 +187,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/mbed/hidkbd/defconfig b/nuttx/configs/mbed/hidkbd/defconfig index ba0af97cac..b4bf00872d 100644 --- a/nuttx/configs/mbed/hidkbd/defconfig +++ b/nuttx/configs/mbed/hidkbd/defconfig @@ -186,7 +186,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig index a1168dd197..2156af80ef 100755 --- a/nuttx/configs/mbed/nsh/defconfig +++ b/nuttx/configs/mbed/nsh/defconfig @@ -181,7 +181,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/micropendous3/hello/defconfig b/nuttx/configs/micropendous3/hello/defconfig index ea8faf8f52..ebc755abcc 100644 --- a/nuttx/configs/micropendous3/hello/defconfig +++ b/nuttx/configs/micropendous3/hello/defconfig @@ -137,7 +137,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for nxflat diff --git a/nuttx/configs/mirtoo/nsh/defconfig b/nuttx/configs/mirtoo/nsh/defconfig index f2e2b8991b..94a6b8b173 100644 --- a/nuttx/configs/mirtoo/nsh/defconfig +++ b/nuttx/configs/mirtoo/nsh/defconfig @@ -200,7 +200,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/mirtoo/nxffs/defconfig b/nuttx/configs/mirtoo/nxffs/defconfig index 29de6f1e72..d633e56d9b 100644 --- a/nuttx/configs/mirtoo/nxffs/defconfig +++ b/nuttx/configs/mirtoo/nxffs/defconfig @@ -200,7 +200,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=n CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/mirtoo/ostest/defconfig b/nuttx/configs/mirtoo/ostest/defconfig index dfe7a25c54..471dab4448 100644 --- a/nuttx/configs/mirtoo/ostest/defconfig +++ b/nuttx/configs/mirtoo/ostest/defconfig @@ -190,7 +190,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=n CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/ne64badge/ostest/defconfig b/nuttx/configs/ne64badge/ostest/defconfig index 78e10f87ca..e6e0df700e 100755 --- a/nuttx/configs/ne64badge/ostest/defconfig +++ b/nuttx/configs/ne64badge/ostest/defconfig @@ -148,7 +148,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=256 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig index cc747e0c8c..2c440bc7f2 100755 --- a/nuttx/configs/nucleus2g/nsh/defconfig +++ b/nuttx/configs/nucleus2g/nsh/defconfig @@ -182,7 +182,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig index 3d777de9cc..c32b1e715f 100755 --- a/nuttx/configs/nucleus2g/ostest/defconfig +++ b/nuttx/configs/nucleus2g/ostest/defconfig @@ -181,7 +181,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig index e5762e8bcb..abe9ac0203 100755 --- a/nuttx/configs/nucleus2g/usbserial/defconfig +++ b/nuttx/configs/nucleus2g/usbserial/defconfig @@ -182,7 +182,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig index 88c54bccc7..adab8f4f0e 100755 --- a/nuttx/configs/nucleus2g/usbstorage/defconfig +++ b/nuttx/configs/nucleus2g/usbstorage/defconfig @@ -183,7 +183,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig index 36c5eefc4f..8ff0d95aaf 100755 --- a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig @@ -192,7 +192,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y # diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig index 35a7bfc3db..6346011879 100755 --- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -262,7 +262,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # CONFIG_SCHED_LPWORK is not set # CONFIG_SCHED_WAITPID is not set # CONFIG_SCHED_ATEXIT is not set diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig index f89d265b00..4ab823b8c7 100755 --- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig @@ -192,7 +192,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig index 0d82b458ba..096f08a8a8 100755 --- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig @@ -194,7 +194,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig index 55c480fe3a..28ad229d6b 100755 --- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig @@ -197,7 +197,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig index 32e2cacc58..02732e74a5 100755 --- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig @@ -187,7 +187,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig index ff2674c793..9becdee046 100755 --- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -190,7 +190,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for nxflat diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig index 936dba3593..fe42a861f9 100755 --- a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig @@ -188,7 +188,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for nxflat diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig index 603a1562a6..995cbad598 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig @@ -188,7 +188,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig index 2c29d2ffd1..e11c2c404e 100755 --- a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig @@ -189,7 +189,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig index 7aaae25140..0a831ce9fc 100644 --- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig +++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig @@ -234,7 +234,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/olimex-stm32-p107/ostest/defconfig b/nuttx/configs/olimex-stm32-p107/ostest/defconfig index d4bba38fbb..272832381e 100644 --- a/nuttx/configs/olimex-stm32-p107/ostest/defconfig +++ b/nuttx/configs/olimex-stm32-p107/ostest/defconfig @@ -242,7 +242,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/olimex-strp711/nettest/defconfig b/nuttx/configs/olimex-strp711/nettest/defconfig index 4d73540b80..a8767c7be1 100755 --- a/nuttx/configs/olimex-strp711/nettest/defconfig +++ b/nuttx/configs/olimex-strp711/nettest/defconfig @@ -160,7 +160,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig index b4bd30ae84..7bce554ac7 100644 --- a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig @@ -189,7 +189,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig index 08bdccddd7..730b8134a9 100644 --- a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig @@ -187,7 +187,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for nxflat diff --git a/nuttx/configs/pic32-starterkit/nsh/defconfig b/nuttx/configs/pic32-starterkit/nsh/defconfig index f2cd275601..32220d89ba 100644 --- a/nuttx/configs/pic32-starterkit/nsh/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh/defconfig @@ -253,7 +253,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/pic32-starterkit/nsh2/defconfig b/nuttx/configs/pic32-starterkit/nsh2/defconfig index 6f227f638d..a7a1ff18a8 100644 --- a/nuttx/configs/pic32-starterkit/nsh2/defconfig +++ b/nuttx/configs/pic32-starterkit/nsh2/defconfig @@ -252,7 +252,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/pic32-starterkit/ostest/defconfig b/nuttx/configs/pic32-starterkit/ostest/defconfig index 922cb8901a..3a55de491e 100644 --- a/nuttx/configs/pic32-starterkit/ostest/defconfig +++ b/nuttx/configs/pic32-starterkit/ostest/defconfig @@ -250,7 +250,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=n CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/pic32mx7mmb/nsh/defconfig b/nuttx/configs/pic32mx7mmb/nsh/defconfig index aa7fc23df9..d39f8bc405 100644 --- a/nuttx/configs/pic32mx7mmb/nsh/defconfig +++ b/nuttx/configs/pic32mx7mmb/nsh/defconfig @@ -259,7 +259,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/pic32mx7mmb/ostest/defconfig b/nuttx/configs/pic32mx7mmb/ostest/defconfig index 1d656380d6..b3cecf98d4 100644 --- a/nuttx/configs/pic32mx7mmb/ostest/defconfig +++ b/nuttx/configs/pic32mx7mmb/ostest/defconfig @@ -250,7 +250,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=n CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig index e61180407f..30f60f0e32 100755 --- a/nuttx/configs/sam3u-ek/knsh/defconfig +++ b/nuttx/configs/sam3u-ek/knsh/defconfig @@ -186,7 +186,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # These NSH commands are (temporarily) disable because more support is needed diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig index 288df5957f..9715984649 100755 --- a/nuttx/configs/sam3u-ek/nsh/defconfig +++ b/nuttx/configs/sam3u-ek/nsh/defconfig @@ -171,7 +171,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig index 7b56b9d41b..dd55d9c932 100755 --- a/nuttx/configs/sam3u-ek/nx/defconfig +++ b/nuttx/configs/sam3u-ek/nx/defconfig @@ -172,7 +172,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig index b2e9a5184f..bf15cb1a59 100755 --- a/nuttx/configs/sam3u-ek/ostest/defconfig +++ b/nuttx/configs/sam3u-ek/ostest/defconfig @@ -172,7 +172,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/sam3u-ek/touchscreen/defconfig b/nuttx/configs/sam3u-ek/touchscreen/defconfig index e89db8c4b3..414eadb6eb 100755 --- a/nuttx/configs/sam3u-ek/touchscreen/defconfig +++ b/nuttx/configs/sam3u-ek/touchscreen/defconfig @@ -180,7 +180,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig index c54d714d0d..383522b6f1 100644 --- a/nuttx/configs/shenzhou/nsh/defconfig +++ b/nuttx/configs/shenzhou/nsh/defconfig @@ -273,7 +273,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # CONFIG_SCHED_LPWORK is not set CONFIG_SCHED_WAITPID=y # CONFIG_SCHED_ATEXIT is not set diff --git a/nuttx/configs/shenzhou/nxwm/defconfig b/nuttx/configs/shenzhou/nxwm/defconfig index 9753277470..b9bf72aebb 100644 --- a/nuttx/configs/shenzhou/nxwm/defconfig +++ b/nuttx/configs/shenzhou/nxwm/defconfig @@ -309,7 +309,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # CONFIG_SCHED_LPWORK is not set # CONFIG_SCHED_WAITPID is not set # CONFIG_SCHED_ATEXIT is not set diff --git a/nuttx/configs/shenzhou/thttpd/defconfig b/nuttx/configs/shenzhou/thttpd/defconfig index 958ab02ed1..d7af34821e 100644 --- a/nuttx/configs/shenzhou/thttpd/defconfig +++ b/nuttx/configs/shenzhou/thttpd/defconfig @@ -260,7 +260,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # CONFIG_SCHED_LPWORK is not set CONFIG_SCHED_WAITPID=y # CONFIG_SCHED_ATEXIT is not set diff --git a/nuttx/configs/sim/nsh/defconfig b/nuttx/configs/sim/nsh/defconfig index a60edd4ac5..2d627a66de 100644 --- a/nuttx/configs/sim/nsh/defconfig +++ b/nuttx/configs/sim/nsh/defconfig @@ -72,7 +72,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=n CONFIG_SCHED_ATEXIT=n CONFIG_SCHED_ONEXIT=n diff --git a/nuttx/configs/sim/nsh2/defconfig b/nuttx/configs/sim/nsh2/defconfig index e5dcce322a..c9e5b343f0 100644 --- a/nuttx/configs/sim/nsh2/defconfig +++ b/nuttx/configs/sim/nsh2/defconfig @@ -91,7 +91,7 @@ CONFIG_PRIORITY_INHERITANCE=n CONFIG_SEM_PREALLOCHOLDERS=0 CONFIG_SEM_NNESTPRIO=0 CONFIG_FDCLONE_DISABLE=n -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_FDCLONE_STDIO=n CONFIG_SDCLONE_DISABLE=y CONFIG_SCHED_WORKQUEUE=n diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig index 43d78e6a22..5cea9a6d44 100644 --- a/nuttx/configs/sim/ostest/defconfig +++ b/nuttx/configs/sim/ostest/defconfig @@ -57,7 +57,7 @@ CONFIG_DEBUG_VERBOSE=y # # CONFIG_DEBUG_ANALOG is not set # CONFIG_DEBUG_DMA is not set -# CONFIG_DEBUG_SYMBOLS is not set +CONFIG_DEBUG_SYMBOLS=y # # System Type @@ -131,6 +131,7 @@ CONFIG_MSEC_PER_TICK=10 CONFIG_RR_INTERVAL=0 # CONFIG_SCHED_INSTRUMENTATION is not set CONFIG_TASK_NAME_SIZE=32 +CONFIG_SCHED_HAVE_PARENT=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2007 CONFIG_START_MONTH=2 @@ -156,6 +157,15 @@ CONFIG_DISABLE_OS_API=y # CONFIG_DISABLE_ENVIRON is not set CONFIG_DISABLE_POLL=y +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCHLD=4 +CONFIG_SIG_SIGCONDTIMEDOUT=16 + # # Sizes of configurable things (0 disables) # @@ -352,6 +362,7 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # CONFIG_EXAMPLES_PASHELLO is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POLL is not set +# CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_QENCODER is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig index e71540c24c..6d84e7c362 100755 --- a/nuttx/configs/stm3210e-eval/RIDE/defconfig +++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig @@ -200,7 +200,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/stm3210e-eval/buttons/defconfig b/nuttx/configs/stm3210e-eval/buttons/defconfig index 0d6882b5d1..37e19171fe 100644 --- a/nuttx/configs/stm3210e-eval/buttons/defconfig +++ b/nuttx/configs/stm3210e-eval/buttons/defconfig @@ -210,7 +210,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/stm3210e-eval/composite/defconfig b/nuttx/configs/stm3210e-eval/composite/defconfig index 2db58aee50..7fee337943 100755 --- a/nuttx/configs/stm3210e-eval/composite/defconfig +++ b/nuttx/configs/stm3210e-eval/composite/defconfig @@ -210,7 +210,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for NXFLAT diff --git a/nuttx/configs/stm3210e-eval/nsh/defconfig b/nuttx/configs/stm3210e-eval/nsh/defconfig index 52fdd777f4..b5e52e4944 100755 --- a/nuttx/configs/stm3210e-eval/nsh/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh/defconfig @@ -208,7 +208,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig index 18e42d539c..30a0bb3276 100644 --- a/nuttx/configs/stm3210e-eval/nsh2/defconfig +++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig @@ -255,7 +255,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig index 68a3ad9b54..0ad42dfbe5 100644 --- a/nuttx/configs/stm3210e-eval/nx/defconfig +++ b/nuttx/configs/stm3210e-eval/nx/defconfig @@ -209,7 +209,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for NXFLAT diff --git a/nuttx/configs/stm3210e-eval/nxconsole/defconfig b/nuttx/configs/stm3210e-eval/nxconsole/defconfig index 9cb8689c6b..7dd5878bf4 100644 --- a/nuttx/configs/stm3210e-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3210e-eval/nxconsole/defconfig @@ -209,7 +209,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for NXFLAT diff --git a/nuttx/configs/stm3210e-eval/nxlines/defconfig b/nuttx/configs/stm3210e-eval/nxlines/defconfig index ab42612f3d..068a17acb4 100644 --- a/nuttx/configs/stm3210e-eval/nxlines/defconfig +++ b/nuttx/configs/stm3210e-eval/nxlines/defconfig @@ -209,7 +209,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for NXFLAT diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig index c00e9b1e87..b6f88a3cac 100644 --- a/nuttx/configs/stm3210e-eval/nxtext/defconfig +++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig @@ -209,7 +209,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for NXFLAT diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig index 8ed1795a6b..0553b1a984 100755 --- a/nuttx/configs/stm3210e-eval/ostest/defconfig +++ b/nuttx/configs/stm3210e-eval/ostest/defconfig @@ -220,7 +220,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/stm3210e-eval/pm/defconfig b/nuttx/configs/stm3210e-eval/pm/defconfig index 7babce8f67..61bd995c8b 100644 --- a/nuttx/configs/stm3210e-eval/pm/defconfig +++ b/nuttx/configs/stm3210e-eval/pm/defconfig @@ -265,7 +265,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig index b41b41f508..94059c07c3 100755 --- a/nuttx/configs/stm3210e-eval/usbserial/defconfig +++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig @@ -210,7 +210,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig index 9f927d7e30..5c1ed5fb29 100755 --- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig +++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig @@ -210,7 +210,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for NXFLAT diff --git a/nuttx/configs/stm3220g-eval/dhcpd/defconfig b/nuttx/configs/stm3220g-eval/dhcpd/defconfig index 04f243d718..29baf9af06 100644 --- a/nuttx/configs/stm3220g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3220g-eval/dhcpd/defconfig @@ -262,7 +262,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3220g-eval/nettest/defconfig b/nuttx/configs/stm3220g-eval/nettest/defconfig index 201df86b0b..08e04ad0ed 100644 --- a/nuttx/configs/stm3220g-eval/nettest/defconfig +++ b/nuttx/configs/stm3220g-eval/nettest/defconfig @@ -262,7 +262,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig index 8baf52f7e8..bd9d028605 100644 --- a/nuttx/configs/stm3220g-eval/nsh/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh/defconfig @@ -297,7 +297,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig index c273ce60f8..b5fe843bca 100644 --- a/nuttx/configs/stm3220g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig @@ -296,7 +296,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index ab061f07a3..145792ddb0 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -316,7 +316,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # CONFIG_SCHED_LPWORK is not set CONFIG_SCHED_WAITPID=y # CONFIG_SCHED_ATEXIT is not set diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig index 2393d0a69e..f63f96c9af 100644 --- a/nuttx/configs/stm3220g-eval/ostest/defconfig +++ b/nuttx/configs/stm3220g-eval/ostest/defconfig @@ -261,7 +261,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=n CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3220g-eval/telnetd/defconfig b/nuttx/configs/stm3220g-eval/telnetd/defconfig index 1401dc6e7d..f529198f17 100644 --- a/nuttx/configs/stm3220g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3220g-eval/telnetd/defconfig @@ -262,7 +262,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig index 80293f66a5..5199cf85c3 100644 --- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig @@ -268,7 +268,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig index 81a53bd680..c5e0da795a 100644 --- a/nuttx/configs/stm3240g-eval/nettest/defconfig +++ b/nuttx/configs/stm3240g-eval/nettest/defconfig @@ -268,7 +268,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig index 54eb1d56f4..6c19ed531d 100644 --- a/nuttx/configs/stm3240g-eval/nsh/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh/defconfig @@ -301,7 +301,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n CONFIG_DEV_RANDOM=y diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig index ba64456157..08690ade3f 100644 --- a/nuttx/configs/stm3240g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig @@ -302,7 +302,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3240g-eval/nxconsole/defconfig b/nuttx/configs/stm3240g-eval/nxconsole/defconfig index f8a1fb7d5b..202fa4378c 100644 --- a/nuttx/configs/stm3240g-eval/nxconsole/defconfig +++ b/nuttx/configs/stm3240g-eval/nxconsole/defconfig @@ -301,7 +301,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig index 5dfdb28fc3..a220af2d1c 100644 --- a/nuttx/configs/stm3240g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig @@ -302,7 +302,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n CONFIG_SCHED_ONEXIT=y diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig index 38b51e84b0..fcc54aa4bd 100644 --- a/nuttx/configs/stm3240g-eval/ostest/defconfig +++ b/nuttx/configs/stm3240g-eval/ostest/defconfig @@ -266,7 +266,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=n CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3240g-eval/telnetd/defconfig b/nuttx/configs/stm3240g-eval/telnetd/defconfig index 471845c144..5aef41c27b 100644 --- a/nuttx/configs/stm3240g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3240g-eval/telnetd/defconfig @@ -268,7 +268,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm3240g-eval/webserver/defconfig b/nuttx/configs/stm3240g-eval/webserver/defconfig index e9cbbf93d4..6d09968e9f 100644 --- a/nuttx/configs/stm3240g-eval/webserver/defconfig +++ b/nuttx/configs/stm3240g-eval/webserver/defconfig @@ -302,7 +302,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=2048 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm32f100rc_generic/nsh/defconfig b/nuttx/configs/stm32f100rc_generic/nsh/defconfig index 65ac9a73d8..12193e7ed8 100644 --- a/nuttx/configs/stm32f100rc_generic/nsh/defconfig +++ b/nuttx/configs/stm32f100rc_generic/nsh/defconfig @@ -249,7 +249,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # CONFIG_SCHED_LPWORK is not set CONFIG_SCHED_WAITPID=y # CONFIG_SCHED_ATEXIT is not set diff --git a/nuttx/configs/stm32f4discovery/README.txt b/nuttx/configs/stm32f4discovery/README.txt index c1d484279a..39fb41d786 100644 --- a/nuttx/configs/stm32f4discovery/README.txt +++ b/nuttx/configs/stm32f4discovery/README.txt @@ -1447,6 +1447,32 @@ Where is one of the following: STANDBY mode. This used of the RTC alarm could conflict with other uses of the RTC alarm in your application. + + posix_spawn: + ------------ + This configuration directory, performs a simple test os the posix_spawn + interface using apps/examples/posix_spawn. + + NOTES: + + 1. This configuration uses the mconf-based configuration tool. To + change this configuration using that tool, you should: + + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ + + b. Execute 'make menuconfig' in nuttx/ in order to start the + reconfiguration process. + + 2. Default toolchain: + + CONFIG_HOST_WINDOWS=y : Builds under windows + CONFIG_WINDOWS_CYGWIN=y : Using Cygwin and + CONFIG_STM32_CODESOURCERYW=y : The native Windows CodeSourcery toolchain + + 3. By default, this project assumes that you are *NOT* using the DFU + bootloader. + winbuild: -------- diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig index 8967fd01c5..98034e22eb 100644 --- a/nuttx/configs/stm32f4discovery/nsh/defconfig +++ b/nuttx/configs/stm32f4discovery/nsh/defconfig @@ -282,7 +282,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm32f4discovery/pm/defconfig b/nuttx/configs/stm32f4discovery/pm/defconfig index 105eb4d37c..3e24168cde 100644 --- a/nuttx/configs/stm32f4discovery/pm/defconfig +++ b/nuttx/configs/stm32f4discovery/pm/defconfig @@ -283,7 +283,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/stm32f4discovery/posix_spawn/defconfig b/nuttx/configs/stm32f4discovery/posix_spawn/defconfig index b908393d87..9e30ada8a4 100644 --- a/nuttx/configs/stm32f4discovery/posix_spawn/defconfig +++ b/nuttx/configs/stm32f4discovery/posix_spawn/defconfig @@ -441,7 +441,7 @@ CONFIG_EOL_IS_EITHER_CRLF=y CONFIG_LIBC_EXECFUNCS=y CONFIG_EXECFUNCS_SYMTAB="exports" CONFIG_EXECFUNCS_NSYMBOLS=10 -CONFIG_POSIX_SPAWN_STACKSIZE=768 +CONFIG_POSIX_SPAWN_STACKSIZE=1024 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y diff --git a/nuttx/configs/sure-pic32mx/nsh/defconfig b/nuttx/configs/sure-pic32mx/nsh/defconfig index 050f302479..60c4dc53d6 100644 --- a/nuttx/configs/sure-pic32mx/nsh/defconfig +++ b/nuttx/configs/sure-pic32mx/nsh/defconfig @@ -202,7 +202,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/sure-pic32mx/ostest/defconfig b/nuttx/configs/sure-pic32mx/ostest/defconfig index eb386e2327..1bca11c479 100644 --- a/nuttx/configs/sure-pic32mx/ostest/defconfig +++ b/nuttx/configs/sure-pic32mx/ostest/defconfig @@ -188,7 +188,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for nxflat diff --git a/nuttx/configs/sure-pic32mx/usbnsh/defconfig b/nuttx/configs/sure-pic32mx/usbnsh/defconfig index 2b28b94c72..978e165413 100644 --- a/nuttx/configs/sure-pic32mx/usbnsh/defconfig +++ b/nuttx/configs/sure-pic32mx/usbnsh/defconfig @@ -199,7 +199,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/teensy/hello/defconfig b/nuttx/configs/teensy/hello/defconfig index 93376ac575..8fafe1a104 100644 --- a/nuttx/configs/teensy/hello/defconfig +++ b/nuttx/configs/teensy/hello/defconfig @@ -137,7 +137,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for nxflat diff --git a/nuttx/configs/teensy/nsh/defconfig b/nuttx/configs/teensy/nsh/defconfig index ffcd94c1dc..faeb0b1030 100755 --- a/nuttx/configs/teensy/nsh/defconfig +++ b/nuttx/configs/teensy/nsh/defconfig @@ -137,7 +137,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for NXFLAT diff --git a/nuttx/configs/teensy/usbstorage/defconfig b/nuttx/configs/teensy/usbstorage/defconfig index dba45073f9..1f01868976 100755 --- a/nuttx/configs/teensy/usbstorage/defconfig +++ b/nuttx/configs/teensy/usbstorage/defconfig @@ -138,7 +138,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # Settings for NXFLAT diff --git a/nuttx/configs/twr-k60n512/nsh/defconfig b/nuttx/configs/twr-k60n512/nsh/defconfig index aeb0c5359a..7a4bb3b3a7 100644 --- a/nuttx/configs/twr-k60n512/nsh/defconfig +++ b/nuttx/configs/twr-k60n512/nsh/defconfig @@ -204,7 +204,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig index 9cf37c763b..355e5773b4 100644 --- a/nuttx/configs/twr-k60n512/ostest/defconfig +++ b/nuttx/configs/twr-k60n512/ostest/defconfig @@ -203,7 +203,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 # # The following can be used to disable categories of diff --git a/nuttx/configs/ubw32/nsh/defconfig b/nuttx/configs/ubw32/nsh/defconfig index 320b7e2669..ad18c12b6a 100644 --- a/nuttx/configs/ubw32/nsh/defconfig +++ b/nuttx/configs/ubw32/nsh/defconfig @@ -189,7 +189,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/ubw32/ostest/defconfig b/nuttx/configs/ubw32/ostest/defconfig index 71f2867001..60322d4f6a 100644 --- a/nuttx/configs/ubw32/ostest/defconfig +++ b/nuttx/configs/ubw32/ostest/defconfig @@ -188,7 +188,7 @@ CONFIG_SCHED_WORKQUEUE=n CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=n CONFIG_SCHED_ATEXIT=n diff --git a/nuttx/configs/vsn/nsh/defconfig b/nuttx/configs/vsn/nsh/defconfig index fa5570596a..2b7d8a20cd 100755 --- a/nuttx/configs/vsn/nsh/defconfig +++ b/nuttx/configs/vsn/nsh/defconfig @@ -247,7 +247,7 @@ CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 -CONFIG_SIG_SIGWORK=4 +CONFIG_SIG_SIGWORK=17 CONFIG_SCHED_WAITPID=y # # The following can be used to disable categories of diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h index 940bf1f1b7..6c67e15005 100644 --- a/nuttx/include/nuttx/sched.h +++ b/nuttx/include/nuttx/sched.h @@ -202,6 +202,9 @@ struct _TCB /* Task Management Fields *****************************************************/ pid_t pid; /* This is the ID of the thread */ +#ifdef CONFIG_SCHED_HAVE_PARENT + pid_t parent; /* This is the ID of the parent thread */ +#endif start_t start; /* Thread start function */ entry_t entry; /* Entry Point into the thread */ diff --git a/nuttx/include/nuttx/wqueue.h b/nuttx/include/nuttx/wqueue.h index c509bf197b..d56901d89a 100644 --- a/nuttx/include/nuttx/wqueue.h +++ b/nuttx/include/nuttx/wqueue.h @@ -68,7 +68,7 @@ * CONFIG_SCHED_WORKSTACKSIZE - The stack size allocated for the worker * thread. Default: CONFIG_IDLETHREAD_STACKSIZE. * CONFIG_SIG_SIGWORK - The signal number that will be used to wake-up - * the worker thread. Default: 4 + * the worker thread. Default: 17 * * CONFIG_SCHED_LPWORK. If CONFIG_SCHED_WORKQUEUE is defined, then a single * work queue is created by default. If CONFIG_SCHED_LPWORK is also defined diff --git a/nuttx/include/signal.h b/nuttx/include/signal.h index 02b2223430..30726105bb 100644 --- a/nuttx/include/signal.h +++ b/nuttx/include/signal.h @@ -66,44 +66,56 @@ /* A few of the real time signals are used within the OS. They have * default values that can be overridden from the configuration file. The - * rest are all user signals: + * rest are all user signals. + * + * These are semi-standard signal definitions: */ #ifndef CONFIG_SIG_SIGUSR1 -#define SIGUSR1 0 /* User signal 1 */ +# define SIGUSR1 1 /* User signal 1 */ #else -#define SIGUSR1 CONFIG_SIG_SIGUSR1 +# define SIGUSR1 CONFIG_SIG_SIGUSR1 #endif #ifndef CONFIG_SIG_SIGUSR2 -#define SIGUSR2 1 /* User signal 2 */ +# define SIGUSR2 2 /* User signal 2 */ #else -#define SIGUSR2 CONFIG_SIG_SIGUSR2 +# define SIGUSR2 CONFIG_SIG_SIGUSR2 #endif #ifndef CONFIG_SIG_SIGALARM -#define SIGALRM 2 /* Default signal used with POSIX timers (used only */ +# define SIGALRM 3 /* Default signal used with POSIX timers (used only */ /* no other signal is provided) */ #else -#define SIGALRM CONFIG_SIG_SIGALARM +# define SIGALRM CONFIG_SIG_SIGALARM #endif -#ifndef CONFIG_DISABLE_PTHREAD -#ifndef CONFIG_SIG_SIGCONDTIMEDOUT -#define SIGCONDTIMEDOUT 3 /* Used in the implementation of pthread_cond_timedwait */ -#else -#define SIGCONDTIMEDOUT CONFIG_SIG_SIGCONDTIMEDOUT +#ifdef CONFIG_SCHED_HAVE_PARENT +# ifndef CONFIG_SIG_SIGCHLD +# define SIGCHLD 4 /* Used by child threads to signal parent thread */ +# else +# define SIGCHLD CONFIG_SIG_SIGCHLD +# endif #endif + +/* The following are non-standard signal definitions */ + +#ifndef CONFIG_DISABLE_PTHREAD +# ifndef CONFIG_SIG_SIGCONDTIMEDOUT +# define SIGCONDTIMEDOUT 16 /* Used in the implementation of pthread_cond_timedwait */ +# else +# define SIGCONDTIMEDOUT CONFIG_SIG_SIGCONDTIMEDOUT +# endif #endif /* SIGWORK is used to wake up various internal, NuttX worker thread */ #if defined(CONFIG_SCHED_WORKQUEUE) || defined(CONFIG_PAGING) -#ifndef CONFIG_SIG_SIGWORK -#define SIGWORK 4 /* Used to wake up the work queue */ -#else -#define SIGWORK CONFIG_SIG_SIGWORK -#endif +# ifndef CONFIG_SIG_SIGWORK +# define SIGWORK 17 /* Used to wake up the work queue */ +# else +# define SIGWORK CONFIG_SIG_SIGWORK +# endif #endif /* sigprocmask() "how" definitions. Only one of the following can be specified: */ @@ -122,12 +134,18 @@ /* These are the possible values of the signfo si_code field */ -#define SI_USER 0 /* Signal sent from kill, raise, or abort */ -#define SI_QUEUE 1 /* Signal sent from sigqueue */ -#define SI_TIMER 2 /* Signal is result of timer expiration */ -#define SI_ASYNCIO 3 /* Signal is the result of asynch IO completion */ -#define SI_MESGQ 4 /* Signal generated by arrival of a message on an */ - /* empty message queue */ +#define SI_USER 0 /* Signal sent from kill, raise, or abort */ +#define SI_QUEUE 1 /* Signal sent from sigqueue */ +#define SI_TIMER 2 /* Signal is result of timer expiration */ +#define SI_ASYNCIO 3 /* Signal is the result of asynch IO completion */ +#define SI_MESGQ 4 /* Signal generated by arrival of a message on an */ + /* empty message queue */ +#define CLD_EXITED 5 /* Child has exited (SIGCHLD only) */ +#define CLD_KILLED 6 /* Child was killed (SIGCHLD only) */ +#define CLD_DUMPED 7 /* Child terminated abnormally (SIGCHLD only) */ +#define CLD_TRAPPED 8 /* Traced child has trapped (SIGCHLD only) */ +#define CLD_STOPPED 9 /* Child has stopped (SIGCHLD only) */ +#define CLD_CONTINUED 10 /* Stopped child had continued (SIGCHLD only) */ /* Values for the sigev_notify field of struct sigevent */ @@ -175,6 +193,10 @@ struct siginfo uint8_t si_signo; /* Identifies signal */ uint8_t si_code; /* Source: SI_USER, SI_QUEUE, SI_TIMER, SI_ASYNCIO, or SI_MESGQ */ union sigval si_value; /* Data passed with signal */ +#ifdef CONFIG_SCHED_HAVE_PARENT + pid_t si_pid; /* Sending task ID */ + int si_status; /* Exit value or signal (SIGCHLD only). */ +#endif }; typedef struct siginfo siginfo_t; diff --git a/nuttx/libc/Kconfig b/nuttx/libc/Kconfig index 2f091f1c7d..72a6a5346e 100644 --- a/nuttx/libc/Kconfig +++ b/nuttx/libc/Kconfig @@ -123,11 +123,12 @@ config EXECFUNCS_NSYMBOLS config POSIX_SPAWN_STACKSIZE int "posix_spawn Stack Size" - default 768 + default 1024 ---help--- If posix_spawn[p] uses I/O redirection options, then it will require an intermediary/proxy task to muck with the file descriptors. This - configuration item specifies the stack size used for the proxy. + configuration item specifies the stack size used for the proxy. Default: + 1024 bytes. endif diff --git a/nuttx/sched/Kconfig b/nuttx/sched/Kconfig index bfaec3b5d5..69621a1fa1 100644 --- a/nuttx/sched/Kconfig +++ b/nuttx/sched/Kconfig @@ -38,6 +38,16 @@ config TASK_NAME_SIZE Useful if scheduler instrumentation is selected. Set to zero to disable. +config SCHED_HAVE_PARENT + bool "Remember Parent" + default n + ---help--- + Remember the ID of the parent thread when a new child thread is + created. This support enables a few minor features (such as + SIGCHLD) and slightly increases the size of the Task Control Block + (TCB) of every task to hold the ID of the parent thread. Default: + disabled. + config JULIAN_TIME bool "Enables Julian time conversions" default n @@ -127,6 +137,7 @@ config SDCLONE_DISABLE config SCHED_WORKQUEUE bool "Enable worker thread" default n + depends on !DISABLE_SIGNALS ---help--- Create a dedicated "worker" thread to handle delayed processing from interrupt handlers. This feature is required for some drivers but, if there are no @@ -158,14 +169,6 @@ config SCHED_WORKSTACKSIZE ---help--- The stack size allocated for the worker thread. Default: 2K. -config SIG_SIGWORK - int "Worker thread wakeup signal" - default 4 - depends on SCHED_WORKQUEUE - ---help--- - The signal number that will be used to wake-up the worker thread. - Default: 4 - config SCHED_LPWORK bool "Enable a lower priority worker thread" default n @@ -310,6 +313,56 @@ config DISABLE_POLL depends on DISABLE_OS_API default n +if !DISABLE_SIGNALS +comment "Signal Numbers" + +config SIG_SIGUSR1 + int "SIGUSR1" + default 1 + ---help--- + Value of standard user signal 1 (SIGUSR1). Default: 1 + +config SIG_SIGUSR2 + int "SIGUSR2" + default 2 + ---help--- + Value of standard user signal 2 (SIGUSR2). Default: 2 + +config SIG_SIGALARM + int "SIGALRM" + default 3 + ---help--- + Default the signal number used with POSIX timers (SIGALRM). + Default: 3 + +config SIG_SIGCHLD + int "SIGCHLD" + default 4 + depends on SCHED_HAVE_PARENT + ---help--- + The SIGCHLD signal is sent to the parent of a child process when it + exits, is interrupted (stopped), or resumes after being interrupted. + Default: 4 + +config SIG_SIGCONDTIMEDOUT + int "SIGCONDTIMEDOUT" + default 16 + depends on !DISABLE_PTHREAD + ---help--- + This non-standard signal number is used the implementation of + pthread_cond_timedwait(). Default 16. + +config SIG_SIGWORK + int "SIGWORK" + default 17 + depends on SCHED_WORKQUEUE + ---help--- + SIGWORK is a non-standard signal used to wake up the internal NuttX + worker thread. This setting specifies the signal number that will be + used for SIGWORK. Default: 17 + +endif + comment "Sizes of configurable things (0 disables)" config MAX_TASKS diff --git a/nuttx/sched/sched_unlock.c b/nuttx/sched/sched_unlock.c index 9a52e8358d..5eafcfc9e7 100644 --- a/nuttx/sched/sched_unlock.c +++ b/nuttx/sched/sched_unlock.c @@ -126,5 +126,6 @@ int sched_unlock(void) irqrestore(flags); } + return OK; } diff --git a/nuttx/sched/sig_kill.c b/nuttx/sched/sig_kill.c index 17921015fb..b3d74d8a18 100644 --- a/nuttx/sched/sig_kill.c +++ b/nuttx/sched/sig_kill.c @@ -84,6 +84,9 @@ int kill(pid_t pid, int signo) { +#ifdef CONFIG_SCHED_HAVE_PARENT + FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head; +#endif FAR _TCB *stcb; siginfo_t info; int ret = ERROR; @@ -124,6 +127,10 @@ int kill(pid_t pid, int signo) info.si_signo = signo; info.si_code = SI_USER; info.si_value.sival_ptr = NULL; +#ifdef CONFIG_SCHED_HAVE_PARENT + info.si_pid = rtcb->pid; + info.si_status = OK; +#endif /* Send the signal */ diff --git a/nuttx/sched/sig_mqnotempty.c b/nuttx/sched/sig_mqnotempty.c index 9a1fd7243b..f7ae6fd0dd 100644 --- a/nuttx/sched/sig_mqnotempty.c +++ b/nuttx/sched/sig_mqnotempty.c @@ -88,6 +88,9 @@ int sig_mqnotempty (int pid, int signo, union sigval value) int sig_mqnotempty (int pid, int signo, void *sival_ptr) #endif { +#ifdef CONFIG_SCHED_HAVE_PARENT + FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head; +#endif FAR _TCB *stcb; siginfo_t info; int ret = ERROR; @@ -113,6 +116,10 @@ int sig_mqnotempty (int pid, int signo, void *sival_ptr) #else info.si_value.sival_ptr = sival_ptr; #endif +#ifdef CONFIG_SCHED_HAVE_PARENT + info.si_pid = rtcb->pid; + info.si_status = OK; +#endif /* Verify that we can perform the signalling operation */ diff --git a/nuttx/sched/sig_queue.c b/nuttx/sched/sig_queue.c index dee1c798a2..db404238e2 100644 --- a/nuttx/sched/sig_queue.c +++ b/nuttx/sched/sig_queue.c @@ -111,6 +111,9 @@ int sigqueue (int pid, int signo, union sigval value) int sigqueue(int pid, int signo, void *sival_ptr) #endif { +#ifdef CONFIG_SCHED_HAVE_PARENT + FAR _TCB *rtcb = (FAR _TCB *)g_readytorun.head; +#endif FAR _TCB *stcb; siginfo_t info; int ret = ERROR; @@ -142,13 +145,17 @@ int sigqueue(int pid, int signo, void *sival_ptr) /* Create the siginfo structure */ - info.si_signo = signo; - info.si_code = SI_QUEUE; + info.si_signo = signo; + info.si_code = SI_QUEUE; #ifdef CONFIG_CAN_PASS_STRUCTS - info.si_value = value; + info.si_value = value; #else info.si_value.sival_ptr = sival_ptr; #endif +#ifdef CONFIG_SCHED_HAVE_PARENT + info.si_pid = rtcb->pid; + info.si_status = OK; +#endif /* Send the signal */ diff --git a/nuttx/sched/sig_timedwait.c b/nuttx/sched/sig_timedwait.c index d7610cd491..b07b8f2a1f 100644 --- a/nuttx/sched/sig_timedwait.c +++ b/nuttx/sched/sig_timedwait.c @@ -120,6 +120,10 @@ static void sig_timeout(int argc, uint32_t itcb) u.wtcb->sigunbinfo.si_signo = SIG_WAIT_TIMEOUT; u.wtcb->sigunbinfo.si_code = SI_TIMER; u.wtcb->sigunbinfo.si_value.sival_int = 0; +#ifdef CONFIG_SCHED_HAVE_PARENT + u.wtcb->sigunbinfo.si_pid = 0; /* Not applicable */ + u.wtcb->sigunbinfo.si_status = OK; +#endif up_unblock_task(u.wtcb); } } diff --git a/nuttx/sched/task_deletecurrent.c b/nuttx/sched/task_deletecurrent.c index 77025f5e0a..7ecfb26cc4 100644 --- a/nuttx/sched/task_deletecurrent.c +++ b/nuttx/sched/task_deletecurrent.c @@ -90,6 +90,9 @@ * Return Value: * OK on success; or ERROR on failure * + * Assumeptions: + * Interrupts are disabled. + * ****************************************************************************/ int task_deletecurrent(void) @@ -108,7 +111,7 @@ int task_deletecurrent(void) (void)sched_removereadytorun(dtcb); rtcb = (FAR _TCB*)g_readytorun.head; - /* We are not in a bad state -- the head of the ready to run task list + /* We are now in a bad state -- the head of the ready to run task list * does not correspond to the thread that is running. Disabling pre- * emption on this TCB and marking the new ready-to-run task as not * running (see, for example, get_errno_ptr()). @@ -132,9 +135,16 @@ int task_deletecurrent(void) (void)sched_mergepending(); } - /* Now calling sched_unlock() should have no effect */ + /* We can't use sched_unlock() to decrement the lock count because the + * sched_mergepending() call above might have changed the task at the + * head of the ready-to-run list. Furthermore, we should not need to + * perform the unlock action anyway because we know that the pending + * task list is empty. So all we really need to do is to decrement + * the lockcount on rctb. + */ - sched_unlock(); + DEBUGASSERT(rtcb->lockcount > 0); + rtcb->lockcount--; return OK; } diff --git a/nuttx/sched/task_exithook.c b/nuttx/sched/task_exithook.c index 3bde8fb7a5..9ce2e5899c 100644 --- a/nuttx/sched/task_exithook.c +++ b/nuttx/sched/task_exithook.c @@ -41,6 +41,7 @@ #include #include +#include #include #include @@ -187,6 +188,56 @@ static inline void task_onexit(FAR _TCB *tcb, int status) # define task_onexit(tcb,status) #endif +/**************************************************************************** + * Name: task_sigchild + * + * Description: + * Send the SIGCHILD signal to the parent thread + * + ****************************************************************************/ + +#ifdef CONFIG_SCHED_HAVE_PARENT +static inline void task_sigchild(FAR _TCB *tcb, int status) +{ + FAR _TCB *ptcb; + siginfo_t info; + + /* Keep things stationary through the following */ + + sched_lock(); + + /* Get the TCB of the receiving task */ + + ptcb = sched_gettcb(tcb->parent); + if (!ptcb) + { + /* The parent no longer exists... bail */ + + sched_unlock(); + return; + } + + /* Create the siginfo structure. We don't actually know the cause. That + * is a bug. Let's just say that the child task just exit-ted for now. + */ + + info.si_signo = SIGCHLD; + info.si_code = CLD_EXITED; + info.si_value.sival_ptr = NULL; + info.si_pid = tcb->pid; + info.si_status = status; + + /* Send the signal. We need to use this internal interface so that we can + * provide the correct si_code value with the signal. + */ + + (void)sig_received(ptcb, &info); + sched_unlock(); +} +#else +# define task_sigchild(tcb,status) +#endif + /**************************************************************************** * Name: task_exitwakeup * @@ -259,6 +310,10 @@ void task_exithook(FAR _TCB *tcb, int status) task_atexit(tcb); + /* Send SIGCHLD to the parent of the exiting task */ + + task_sigchild(tcb, status); + /* Call any registered on_exit function(s) */ task_onexit(tcb, status); diff --git a/nuttx/sched/task_setup.c b/nuttx/sched/task_setup.c index 8721b39ec1..c5dd8ca3a8 100644 --- a/nuttx/sched/task_setup.c +++ b/nuttx/sched/task_setup.c @@ -146,6 +146,34 @@ static int task_assignpid(FAR _TCB *tcb) return ERROR; } +/**************************************************************************** + * Name: task_saveparent + * + * Description: + * Save the task ID of the parent task in the child task's TCB. + * + * Parameters: + * tcb - The TCB of the new, child task. + * + * Returned Value: + * None + * + * Assumptions: + * The parent of the new task is the task at the head of the ready-to-run + * list. + * + ****************************************************************************/ + +#ifdef CONFIG_SCHED_HAVE_PARENT +static inline void task_saveparent(FAR _TCB *tcb) +{ + FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head; + tcb->parent = rtcb->pid; +} +#else +# define task_saveparent(tcb) +#endif + /**************************************************************************** * Name: task_dupdspace * @@ -161,6 +189,8 @@ static int task_assignpid(FAR _TCB *tcb) * None * * Assumptions: + * The parent of the new task is the task at the head of the ready-to-run + * list. * ****************************************************************************/ @@ -231,6 +261,10 @@ int task_schedsetup(FAR _TCB *tcb, int priority, start_t start, main_t main) tcb->start = start; tcb->entry.main = main; + /* Save the task ID of the parent task in the TCB */ + + task_saveparent(tcb); + /* exec(), pthread_create(), task_create(), and vfork() all * inherit the signal mask of the parent thread. */ @@ -243,7 +277,7 @@ int task_schedsetup(FAR _TCB *tcb, int priority, start_t start, main_t main) * until it is activated. */ - tcb->task_state = TSTATE_TASK_INVALID; + tcb->task_state = TSTATE_TASK_INVALID; /* Clone the parent tasks D-Space (if it was running PIC). This * must be done before calling up_initial_state() so that the diff --git a/nuttx/sched/timer_settime.c b/nuttx/sched/timer_settime.c index 1814ba8988..f09842ad44 100644 --- a/nuttx/sched/timer_settime.c +++ b/nuttx/sched/timer_settime.c @@ -113,6 +113,10 @@ static void inline timer_sigqueue(FAR struct posix_timer_s *timer) #else info.si_value.sival_ptr = timer->pt_value.sival_ptr; #endif +#ifdef CONFIG_SCHED_HAVE_PARENT + info.si_pid = 0; /* Not applicable */ + info.si_status = OK; +#endif /* Send the signal */