mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
sched/signal: update nxsig_clockwait() to support disable all signals
Update nxsig_clockwait() to handle the case where all signals functions are disabled. Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
committed by
Xiang Xiao
parent
8514e9978f
commit
9c80011c53
+18
-18
@@ -20,25 +20,25 @@
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS sig_nanosleep.c sig_usleep.c sig_sleep.c sig_clockwait.c)
|
||||
|
||||
if(NOT CONFIG_DISABLE_ALL_SIGNALS)
|
||||
set(SRCS
|
||||
sig_procmask.c
|
||||
sig_suspend.c
|
||||
sig_kill.c
|
||||
sig_tgkill.c
|
||||
sig_queue.c
|
||||
sig_waitinfo.c
|
||||
sig_timedwait.c
|
||||
sig_lowest.c
|
||||
sig_notification.c
|
||||
sig_dispatch.c
|
||||
sig_pause.c
|
||||
sig_clockwait.c
|
||||
sig_nanosleep.c
|
||||
sig_usleep.c
|
||||
sig_sleep.c
|
||||
sig_ppoll.c
|
||||
sig_pselect.c)
|
||||
list(
|
||||
APPEND
|
||||
SRCS
|
||||
sig_procmask.c
|
||||
sig_suspend.c
|
||||
sig_kill.c
|
||||
sig_tgkill.c
|
||||
sig_queue.c
|
||||
sig_waitinfo.c
|
||||
sig_timedwait.c
|
||||
sig_lowest.c
|
||||
sig_notification.c
|
||||
sig_dispatch.c
|
||||
sig_pause.c
|
||||
sig_ppoll.c
|
||||
sig_pselect.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_ENABLE_ALL_SIGNALS)
|
||||
|
||||
@@ -19,11 +19,14 @@
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
CSRCS += sig_nanosleep.c sig_sleep.c sig_usleep.c sig_clockwait.c
|
||||
|
||||
ifneq ($(CONFIG_DISABLE_ALL_SIGNALS),y)
|
||||
CSRCS += sig_dispatch.c sig_kill.c sig_lowest.c sig_nanosleep.c
|
||||
CSRCS += sig_dispatch.c sig_kill.c sig_lowest.c
|
||||
CSRCS += sig_notification.c sig_pause.c sig_ppoll.c sig_procmask.c
|
||||
CSRCS += sig_pselect.c sig_queue.c sig_sleep.c sig_suspend.c sig_tgkill.c
|
||||
CSRCS += sig_timedwait.c sig_usleep.c sig_waitinfo.c sig_clockwait.c
|
||||
CSRCS += sig_pselect.c sig_queue.c sig_suspend.c sig_tgkill.c
|
||||
CSRCS += sig_timedwait.c sig_waitinfo.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
|
||||
|
||||
@@ -109,17 +109,23 @@ void nxsig_wait_irq(FAR struct tcb_s *wtcb, uint8_t signo,
|
||||
{
|
||||
FAR struct tcb_s *rtcb = this_task();
|
||||
|
||||
#ifdef CONFIG_DISABLE_ALL_SIGNALS
|
||||
UNUSED(signo);
|
||||
UNUSED(code);
|
||||
UNUSED(errcode);
|
||||
#else
|
||||
if (wtcb->sigunbinfo != NULL)
|
||||
{
|
||||
wtcb->sigunbinfo->si_signo = signo;
|
||||
wtcb->sigunbinfo->si_code = code;
|
||||
wtcb->sigunbinfo->si_errno = errcode;
|
||||
wtcb->sigunbinfo->si_value.sival_int = 0;
|
||||
#ifdef CONFIG_SCHED_HAVE_PARENT
|
||||
# ifdef CONFIG_SCHED_HAVE_PARENT
|
||||
wtcb->sigunbinfo->si_pid = 0; /* Not applicable */
|
||||
wtcb->sigunbinfo->si_status = OK;
|
||||
#endif
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Remove the task from waiting list */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user