From 4810499d3a985e3a3f03ca6be5fb6c565a1f71e9 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 7 Oct 2017 10:57:09 -0600 Subject: [PATCH] Squashed commit of the following: Replace all calls to sigqueue() in the OS proper with calls to nxsig_queue() to avoid accessing the errno variable. sched/signal: Add nxsig_queue() which is functionally equivalent to sigqueue() except that it does not modify the errno variable. --- drivers/input/ajoystick.c | 11 +- drivers/input/button_upper.c | 10 +- drivers/input/djoystick.c | 10 +- drivers/net/phy_notify.c | 11 +- drivers/sensors/zerocross.c | 35 +++--- drivers/timers/oneshot.c | 5 +- drivers/timers/rtc.c | 11 +- drivers/timers/timer.c | 9 +- .../wireless/ieee802154/xbee/xbee_netdev.c | 8 +- fs/aio/aio_signal.c | 29 ++--- include/nuttx/signal.h | 41 +++++++ sched/pthread/pthread_condtimedwait.c | 15 +-- sched/signal/sig_mqnotempty.c | 11 +- sched/signal/sig_queue.c | 103 +++++++++++++----- sched/signal/sig_timedwait.c | 2 +- sched/timer/timer_settime.c | 4 +- wireless/ieee802154/mac802154_device.c | 9 +- wireless/ieee802154/mac802154_netdev.c | 8 +- 18 files changed, 220 insertions(+), 112 deletions(-) diff --git a/drivers/input/ajoystick.c b/drivers/input/ajoystick.c index 33124143eae..bed67d18901 100644 --- a/drivers/input/ajoystick.c +++ b/drivers/input/ajoystick.c @@ -58,9 +58,10 @@ #include #include +#include +#include #include #include -#include #include @@ -376,10 +377,12 @@ static void ajoy_sample(FAR struct ajoy_upperhalf_s *priv) #ifdef CONFIG_CAN_PASS_STRUCTS union sigval value; value.sival_int = (int)sample; - (void)sigqueue(opriv->ao_pid, opriv->ao_notify.an_signo, value); + + (void)nxsig_queue(opriv->ao_pid, opriv->ao_notify.an_signo, + value); #else - (void)sigqueue(opriv->ao_pid, opriv->ao_notify.dn.signo, - (FAR void *)sample); + (void)nxsig_queue(opriv->ao_pid, opriv->ao_notify.dn.signo, + (FAR void *)sample); #endif } #endif diff --git a/drivers/input/button_upper.c b/drivers/input/button_upper.c index 5f04eacb0f2..c172ecfa1dc 100644 --- a/drivers/input/button_upper.c +++ b/drivers/input/button_upper.c @@ -54,9 +54,10 @@ #include #include +#include +#include #include #include -#include #include @@ -358,10 +359,11 @@ static void btn_sample(FAR struct btn_upperhalf_s *priv) #ifdef CONFIG_CAN_PASS_STRUCTS union sigval value; value.sival_int = (int)sample; - (void)sigqueue(opriv->bo_pid, opriv->bo_notify.bn_signo, value); + (void)nxsig_queue(opriv->bo_pid, opriv->bo_notify.bn_signo, + value); #else - (void)sigqueue(opriv->bo_pid, opriv->bo_notify.dn.signo, - (FAR void *)sample); + (void)nxsig_queue(opriv->bo_pid, opriv->bo_notify.dn.signo, + (FAR void *)sample); #endif } #endif diff --git a/drivers/input/djoystick.c b/drivers/input/djoystick.c index b7548c6d0d3..c0de969bf3c 100644 --- a/drivers/input/djoystick.c +++ b/drivers/input/djoystick.c @@ -58,9 +58,10 @@ #include #include +#include +#include #include #include -#include #include @@ -376,10 +377,11 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv) #ifdef CONFIG_CAN_PASS_STRUCTS union sigval value; value.sival_int = (int)sample; - (void)sigqueue(opriv->do_pid, opriv->do_notify.dn_signo, value); + (void)nxsig_queue(opriv->do_pid, opriv->do_notify.dn_signo, + value); #else - (void)sigqueue(opriv->do_pid, opriv->do_notify.dn.signo, - (FAR void *)sample); + (void)nxsig_queue(opriv->do_pid, opriv->do_notify.dn.signo, + (FAR void *)sample); #endif } #endif diff --git a/drivers/net/phy_notify.c b/drivers/net/phy_notify.c index 3c21eb5e5ab..a9d23143155 100644 --- a/drivers/net/phy_notify.c +++ b/drivers/net/phy_notify.c @@ -58,6 +58,7 @@ #include #include +#include #include #ifdef CONFIG_ARCH_PHY_INTERRUPT @@ -251,18 +252,14 @@ static int phy_handler(int irq, FAR void *context, FAR void *arg) #ifdef CONFIG_CAN_PASS_STRUCTS value.sival_ptr = client->arg; - ret = sigqueue(client->pid, client->signo, value); + ret = nxsig_queue(client->pid, client->signo, value); #else - ret = sigqueue(client->pid, client->signo, client->arg); + ret = nxsig_queue(client->pid, client->signo, client->arg); #endif if (ret < 0) { - int errcode = errno; - DEBUGASSERT(errcode > 0); - - nerr("ERROR: sigqueue failed: %d\n", errcode); - UNUSED(errcode); + nerr("ERROR: nxsig_queue failed: %d\n", ret); } return OK; diff --git a/drivers/sensors/zerocross.c b/drivers/sensors/zerocross.c index 6fcde36fb0c..3f01650f178 100644 --- a/drivers/sensors/zerocross.c +++ b/drivers/sensors/zerocross.c @@ -52,8 +52,9 @@ #include #include -#include #include +#include +#include #include #include @@ -206,23 +207,23 @@ static void zerocross_interrupt(FAR const struct zc_lowerhalf_s *lower, #ifdef CONFIG_CAN_PASS_STRUCTS union sigval value; value.sival_int = (int)sample; - (void)sigqueue(opriv->do_pid, opriv->do_notify.zc_signo, value); + (void)nxsig_queue(opriv->do_pid, opriv->do_notify.zc_signo, value); #else - (void)sigqueue(opriv->do_pid, opriv->do_notify.zc_signo, - (FAR void *)sample); + (void)nxsig_queue(opriv->do_pid, opriv->do_notify.zc_signo, + (FAR void *)sample); #endif } leave_critical_section(flags); } -/************************************************************************************ +/**************************************************************************** * Name: zc_open * * Description: * This function is called whenever the PWM device is opened. * - ************************************************************************************/ + ****************************************************************************/ static int zc_open(FAR struct file *filep) { @@ -271,13 +272,13 @@ errout_with_sem: return ret; } -/************************************************************************************ +/**************************************************************************** * Name: zc_close * * Description: * This function is called when the PWM device is closed. * - ************************************************************************************/ + ****************************************************************************/ static int zc_close(FAR struct file *filep) { @@ -366,43 +367,45 @@ errout_with_exclsem: return ret; } -/************************************************************************************ +/**************************************************************************** * Name: zc_read * * Description:O * A dummy read method. This is provided only to satsify the VFS layer. * - ************************************************************************************/ + ****************************************************************************/ -static ssize_t zc_read(FAR struct file *filep, FAR char *buffer, size_t buflen) +static ssize_t zc_read(FAR struct file *filep, FAR char *buffer, + size_t buflen) { /* Return zero -- usually meaning end-of-file */ return 0; } -/************************************************************************************ +/**************************************************************************** * Name: zc_write * * Description: * A dummy write method. This is provided only to satsify the VFS layer. * - ************************************************************************************/ + ****************************************************************************/ -static ssize_t zc_write(FAR struct file *filep, FAR const char *buffer, size_t buflen) +static ssize_t zc_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen) { /* Return a failure */ return -EPERM; } -/************************************************************************************ +/**************************************************************************** * Name: zc_ioctl * * Description: * The standard ioctl method. This is where ALL of the PWM work is done. * - ************************************************************************************/ + ****************************************************************************/ static int zc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { diff --git a/drivers/timers/oneshot.c b/drivers/timers/oneshot.c index d7537e979ef..404bb2a1d4f 100644 --- a/drivers/timers/oneshot.c +++ b/drivers/timers/oneshot.c @@ -50,6 +50,7 @@ #include #include +#include #include #include @@ -139,9 +140,9 @@ static void oneshot_callback(FAR struct oneshot_lowerhalf_s *lower, #ifdef CONFIG_CAN_PASS_STRUCTS value.sival_ptr = priv->od_arg; - (void)sigqueue(priv->od_pid, priv->od_signo, value); + (void)nxsig_queue(priv->od_pid, priv->od_signo, value); #else - (void)sigqueue(priv->od_pid, priv->od_signo, priv->od_arg); + (void)nxsig_queue(priv->od_pid, priv->od_signo, priv->od_arg); #endif } diff --git a/drivers/timers/rtc.c b/drivers/timers/rtc.c index e712be0c1cc..76a2de372a2 100644 --- a/drivers/timers/rtc.c +++ b/drivers/timers/rtc.c @@ -1,7 +1,7 @@ /**************************************************************************** * drivers/timers/rtc.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -46,6 +46,7 @@ #include #include +#include #include #include @@ -188,11 +189,11 @@ static void rtc_alarm_callback(FAR void *priv, int alarmid) /* Yes.. signal the alarm expriration */ #ifdef CONFIG_CAN_PASS_STRUCTS - (void)sigqueue(alarminfo->pid, alarminfo->signo, - alarminfo->sigvalue); + (void)nxsig_queue(alarminfo->pid, alarminfo->signo, + alarminfo->sigvalue); #else - (void)sigqueue(alarminfo->pid, alarminfo->signo, - alarminfo->sigvalue->sival_ptr); + (void)nxsig_queue(alarminfo->pid, alarminfo->signo, + alarminfo->sigvalue->sival_ptr); #endif } diff --git a/drivers/timers/timer.c b/drivers/timers/timer.c index 4cfdacaac76..d760a2c4c64 100644 --- a/drivers/timers/timer.c +++ b/drivers/timers/timer.c @@ -1,7 +1,7 @@ /**************************************************************************** * drivers/timers/timer.c * - * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016-2017 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Bob Doiron * @@ -51,9 +51,10 @@ #include #include -#include #include #include +#include +#include #include #ifdef CONFIG_TIMER @@ -138,9 +139,9 @@ static bool timer_notifier(FAR uint32_t *next_interval_us, FAR void *arg) #ifdef CONFIG_CAN_PASS_STRUCTS value.sival_ptr = upper->arg; - (void)sigqueue(upper->pid, upper->signo, value); + (void)nxsig_queue(upper->pid, upper->signo, value); #else - (void)sigqueue(upper->pid, upper->signo, upper->arg); + (void)nxsig_queue(upper->pid, upper->signo, upper->arg); #endif return true; diff --git a/drivers/wireless/ieee802154/xbee/xbee_netdev.c b/drivers/wireless/ieee802154/xbee/xbee_netdev.c index ba17982311c..779dfcb5fe6 100644 --- a/drivers/wireless/ieee802154/xbee/xbee_netdev.c +++ b/drivers/wireless/ieee802154/xbee/xbee_netdev.c @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -494,10 +495,11 @@ static void xbeenet_notify(FAR struct xbee_maccb_s *maccb, #ifdef CONFIG_CAN_PASS_STRUCTS union sigval value; value.sival_int = (int)notif->notiftype; - (void)sigqueue(priv->xd_notify_pid, priv->xd_notify_signo, value); + (void)nxsig_queue(priv->xd_notify_pid, priv->xd_notify_signo, + value); #else - (void)sigqueue(priv->xd_notify_pid, priv->xd_notify_signo, - (FAR void *)notif->notiftype); + (void)nxsig_queue(priv->xd_notify_pid, priv->xd_notify_signo, + (FAR void *)notif->notiftype); #endif } #endif diff --git a/fs/aio/aio_signal.c b/fs/aio/aio_signal.c index fa27efa789b..be46e111690 100644 --- a/fs/aio/aio_signal.c +++ b/fs/aio/aio_signal.c @@ -47,6 +47,8 @@ #include #include +#include + #include "aio/aio.h" #ifdef CONFIG_FS_AIO @@ -80,7 +82,6 @@ int aio_signal(pid_t pid, FAR struct aiocb *aiocbp) #ifdef CONFIG_CAN_PASS_STRUCTS union sigval value; #endif - int errcode; int status; int ret; @@ -93,17 +94,15 @@ int aio_signal(pid_t pid, FAR struct aiocb *aiocbp) if (aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL) { #ifdef CONFIG_CAN_PASS_STRUCTS - status = sigqueue(pid, aiocbp->aio_sigevent.sigev_signo, + ret = nxsig_queue(pid, aiocbp->aio_sigevent.sigev_signo, aiocbp->aio_sigevent.sigev_value); #else - status = sigqueue(pid, aiocbp->aio_sigevent.sigev_sign, + ret = nxsig_queue(pid, aiocbp->aio_sigevent.sigev_sign, aiocbp->aio_sigevent.sigev_value.sival_ptr); #endif - if (status < 0) + if (ret < 0) { - errcode = get_errno(); - ferr("ERROR: sigqueue #1 failed: %d\n", errcode); - ret = ERROR; + ferr("ERROR: nxsig_queue #1 failed: %d\n", ret); } } @@ -126,22 +125,24 @@ int aio_signal(pid_t pid, FAR struct aiocb *aiocbp) #ifdef CONFIG_CAN_PASS_STRUCTS value.sival_ptr = aiocbp; - status = sigqueue(pid, SIGPOLL, value); + status = nxsig_queue(pid, SIGPOLL, value); #else - status = sigqueue(pid, SIGPOLL, aiocbp); + status = nxsig_queue(pid, SIGPOLL, aiocbp); #endif - if (status && ret == OK) + if (status < 0) { - errcode = get_errno(); - ferr("ERROR: sigqueue #2 failed: %d\n", errcode); - ret = ERROR; + ferr("ERROR: nxsig_queue #2 failed: %d\n", status); + if (ret >= OK) + { + ret = status; + } } /* Make sure that errno is set correctly on return */ if (ret < 0) { - set_errno(errcode); + set_errno(-ret); return ERROR; } diff --git a/include/nuttx/signal.h b/include/nuttx/signal.h index c566c4b85fe..3e6bd5e1d11 100644 --- a/include/nuttx/signal.h +++ b/include/nuttx/signal.h @@ -51,6 +51,47 @@ struct timespec; /* Forward reference */ +/**************************************************************************** + * Name: nxsig_queue + * + * Description: + * This function sends the signal specified by signo with the signal + * parameter value to the process specified by pid. + * + * If the receiving process has the signal blocked via the sigprocmask, + * the signal will pend until it is unmasked. Only one pending signal (per + * signo) is retained. This is consistent with POSIX which states, "If + * a subsequent occurrence of a pending signal is generated, it is + * implementation defined as to whether the signal is delivered more than + * once. + * + * This is an internal OS interface. It is functionally equivalent to + * sigqueue() except that it does not modify the errno value. + * + * Parameters: + * pid - Process ID of task to receive signal + * signo - Signal number + * value - Value to pass to task with signal + * + * Return Value: + * This is an internal OS interface and should not be used by applications. + * It follows the NuttX internal error return policy: Zero (OK) is + * returned on success. A negated errno value is returned on failure. + * + * EGAIN - The limit of signals which may be queued has been reached. + * EINVAL - sig was invalid. + * EPERM - The process does not have permission to send the + * signal to the receiving process. + * ESRCH - No process has a PID matching pid. + * + ****************************************************************************/ + +#ifdef CONFIG_CAN_PASS_STRUCTS +int nxsig_queue (int pid, int signo, union sigval value); +#else +int nxsig_queue(int pid, int signo, void *sival_ptr); +#endif + /**************************************************************************** * Name: nxsig_kill * diff --git a/sched/pthread/pthread_condtimedwait.c b/sched/pthread/pthread_condtimedwait.c index 16330b0d8ee..58b4f448893 100644 --- a/sched/pthread/pthread_condtimedwait.c +++ b/sched/pthread/pthread_condtimedwait.c @@ -51,6 +51,7 @@ #include #include +#include #include #include "sched/sched.h" @@ -88,10 +89,10 @@ static void pthread_condtimedout(int argc, uint32_t pid, uint32_t signo) FAR struct tcb_s *tcb; siginfo_t info; - /* The logic below if equivalent to sigqueue(), but uses nxsig_tcbdispatch() - * instead of nxsig_dispatch(). This avoids the group signal deliver logic - * and assures, instead, that the signal is delivered specifically to this - * thread that is known to be waiting on the signal. + /* The logic below if equivalent to nxsig_queue(), but uses + * nxsig_tcbdispatch() instead of nxsig_dispatch(). This avoids the group + * signal deliver logic and assures, instead, that the signal is delivered + * specifically to this thread that is known to be waiting on the signal. */ /* Get the waiting TCB. sched_gettcb() might return NULL if the task has @@ -123,7 +124,7 @@ static void pthread_condtimedout(int argc, uint32_t pid, uint32_t signo) #else /* HAVE_GROUP_MEMBERS */ /* Things are a little easier if there are not group members. We can just - * use sigqueue(). + * use nxsig_queue(). */ #ifdef CONFIG_CAN_PASS_STRUCTS @@ -132,9 +133,9 @@ static void pthread_condtimedout(int argc, uint32_t pid, uint32_t signo) /* Send the specified signal to the specified task. */ value.sival_ptr = NULL; - (void)sigqueue((int)pid, (int)signo, value); + (void)nxsig_queue((int)pid, (int)signo, value); #else - (void)sigqueue((int)pid, (int)signo, NULL); + (void)nxsig_queue((int)pid, (int)signo, NULL); #endif #endif /* HAVE_GROUP_MEMBERS */ diff --git a/sched/signal/sig_mqnotempty.c b/sched/signal/sig_mqnotempty.c index 9569ad3c600..d585fdcc0ed 100644 --- a/sched/signal/sig_mqnotempty.c +++ b/sched/signal/sig_mqnotempty.c @@ -45,6 +45,8 @@ #include #include +#include + #include "sched/sched.h" #include "signal/signal.h" @@ -56,10 +58,11 @@ * Name: nxsig_mqnotempty * * Description: - * This function is equivalent to sigqueue(), but supports the messaging - * system's requirement to signal a task when a message queue becomes - * non-empty. It is identical to sigqueue(), except that it sets the - * si_code field in the siginfo structure to SI_MESGQ rather than SI_QUEUE. + * This function is equivalent to nxsig_queue(), but supports the + * messaging system's requirement to signal a task when a message queue + * becomes non-empty. It is identical to nxsig_queue(), except that it + * sets the si_code field in the siginfo structure to SI_MESGQ rather than + * SI_QUEUE. * ****************************************************************************/ diff --git a/sched/signal/sig_queue.c b/sched/signal/sig_queue.c index ae5d53067dd..455b7ea72d5 100644 --- a/sched/signal/sig_queue.c +++ b/sched/signal/sig_queue.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/signal/sig_queue.c * - * Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2013, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -45,6 +45,8 @@ #include #include +#include + #include "sched/sched.h" #include "signal/signal.h" @@ -53,7 +55,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: sigqueue + * Name: nxsig_queue * * Description: * This function sends the signal specified by signo with the signal @@ -64,7 +66,10 @@ * signo) is retained. This is consistent with POSIX which states, "If * a subsequent occurrence of a pending signal is generated, it is * implementation defined as to whether the signal is delivered more than - * once." + * once. + * + * This is an internal OS interface. It is functionally equivalent to + * sigqueue() except that it does not modify the errno value. * * Parameters: * pid - Process ID of task to receive signal @@ -72,23 +77,22 @@ * value - Value to pass to task with signal * * Return Value: - * On success (at least one signal was sent), zero is returned. On - * error, -1 is returned, and errno is set appropriately: + * This is an internal OS interface and should not be used by applications. + * It follows the NuttX internal error return policy: Zero (OK) is + * returned on success. A negated errno value is returned on failure. * - * EGAIN The limit of signals which may be queued has been reached. - * EINVAL sig was invalid. - * EPERM The process does not have permission to send the - * signal to the receiving process. - * ESRCH No process has a PID matching pid. - * - * Assumptions: + * EGAIN - The limit of signals which may be queued has been reached. + * EINVAL - sig was invalid. + * EPERM - The process does not have permission to send the + * signal to the receiving process. + * ESRCH - No process has a PID matching pid. * ****************************************************************************/ #ifdef CONFIG_CAN_PASS_STRUCTS -int sigqueue (int pid, int signo, union sigval value) +int nxsig_queue (int pid, int signo, union sigval value) #else -int sigqueue(int pid, int signo, void *sival_ptr) +int nxsig_queue(int pid, int signo, void *sival_ptr) #endif { #ifdef CONFIG_SCHED_HAVE_PARENT @@ -107,8 +111,7 @@ int sigqueue(int pid, int signo, void *sival_ptr) if (!GOOD_SIGNO(signo)) { - ret = -EINVAL; - goto errout; + return -EINVAL; } /* Create the siginfo structure */ @@ -132,17 +135,61 @@ int sigqueue(int pid, int signo, void *sival_ptr) ret = nxsig_dispatch(pid, &info); sched_unlock(); - /* Check for errors */ - - if (ret < 0) - { - goto errout; - } - - return OK; - -errout: - set_errno(-ret); - return ERROR; + return ret; } +/**************************************************************************** + * Name: sigqueue + * + * Description: + * This function sends the signal specified by signo with the signal + * parameter value to the process specified by pid. + * + * If the receiving process has the signal blocked via the sigprocmask, + * the signal will pend until it is unmasked. Only one pending signal (per + * signo) is retained. This is consistent with POSIX which states, "If + * a subsequent occurrence of a pending signal is generated, it is + * implementation defined as to whether the signal is delivered more than + * once." + * + * Parameters: + * pid - Process ID of task to receive signal + * signo - Signal number + * value - Value to pass to task with signal + * + * Return Value: + * On success (at least one signal was sent), zero (OK) is returned. On + * any failure, -1 (ERROR) is returned and errno varaible is set + * appropriately: + * + * EGAIN - The limit of signals which may be queued has been reached. + * EINVAL - sig was invalid. + * EPERM - The process does not have permission to send the + * signal to the receiving process. + * ESRCH - No process has a PID matching pid. + * + ****************************************************************************/ + +#ifdef CONFIG_CAN_PASS_STRUCTS +int sigqueue (int pid, int signo, union sigval value) +#else +int sigqueue(int pid, int signo, void *sival_ptr) +#endif +{ + int ret; + + /* Let nxsig_queue() do all of the real work */ + +#ifdef CONFIG_CAN_PASS_STRUCTS + ret = nxsig_queue(pid, signo, value); +#else + ret = nxsig_queue(pid, signo, sival_ptr); +#endif + if (ret < 0) + { + set_errno(-ret); + ret = ERROR; + } + + return ret; +} diff --git a/sched/signal/sig_timedwait.c b/sched/signal/sig_timedwait.c index 7ffd8b6f326..5699db8414e 100644 --- a/sched/signal/sig_timedwait.c +++ b/sched/signal/sig_timedwait.c @@ -161,7 +161,7 @@ static void nxsig_timeout(int argc, wdparm_t itcb) * If the info argument is non-NULL, the selected signal number is stored * in the si_signo member and the cause of the signal is store din the * si_code member. The content of si_value is only meaningful if the - * signal was generated by sigqueue(). + * signal was generated by sigqueue() (or nxsig_queue). * * This is an internal OS interface. It is functionally equivalent to * sigtimedwait() except that: diff --git a/sched/timer/timer_settime.c b/sched/timer/timer_settime.c index 5a01c2346a3..9be2104c356 100644 --- a/sched/timer/timer_settime.c +++ b/sched/timer/timer_settime.c @@ -70,8 +70,8 @@ static void timer_timeout(int argc, wdparm_t itimer); * Name: timer_signotify * * Description: - * This function basically reimplements sigqueue() so that the si_code can - * be correctly set to SI_TIMER + * This function basically reimplements nxsig_queue() so that the si_code + * can be correctly set to SI_TIMER * * Parameters: * timer - A reference to the POSIX timer that just timed out diff --git a/wireless/ieee802154/mac802154_device.c b/wireless/ieee802154/mac802154_device.c index 66857f43b6c..c5dc2b4e28c 100644 --- a/wireless/ieee802154/mac802154_device.c +++ b/wireless/ieee802154/mac802154_device.c @@ -49,7 +49,7 @@ #include #include - +#include #include #include @@ -792,10 +792,11 @@ static void mac802154dev_notify(FAR struct mac802154_maccb_s *maccb, #ifdef CONFIG_CAN_PASS_STRUCTS union sigval value; value.sival_int = (int)notif->notiftype; - (void)sigqueue(dev->md_notify_pid, dev->md_notify_signo, value); + (void)nxsig_queue(dev->md_notify_pid, dev->md_notify_signo, + value); #else - (void)sigqueue(dev->md_notify_pid, dev->md_notify_signo, - (FAR void *)notif->notiftype); + (void)nxsig_queue(dev->md_notify_pid, dev->md_notify_signo, + (FAR void *)notif->notiftype); #endif } #endif diff --git a/wireless/ieee802154/mac802154_netdev.c b/wireless/ieee802154/mac802154_netdev.c index e9412afa1de..bda34e3d2b7 100644 --- a/wireless/ieee802154/mac802154_netdev.c +++ b/wireless/ieee802154/mac802154_netdev.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -493,10 +494,11 @@ static void macnet_notify(FAR struct mac802154_maccb_s *maccb, #ifdef CONFIG_CAN_PASS_STRUCTS union sigval value; value.sival_int = (int)notif->notiftype; - (void)sigqueue(priv->md_notify_pid, priv->md_notify_signo, value); + (void)nxsig_queue(priv->md_notify_pid, priv->md_notify_signo, + value); #else - (void)sigqueue(priv->md_notify_pid, priv->md_notify_signo, - (FAR void *)notif->notiftype); + (void)nxsig_queue(priv->md_notify_pid, priv->md_notify_signo, + (FAR void *)notif->notiftype); #endif } #endif