This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 10fd3094526 sched/signal: Remove shadow definitions to reduce
unnecessary API
10fd3094526 is described below
commit 10fd3094526d7d4bc2b2d80589e5028ec8ea984b
Author: chao an <[email protected]>
AuthorDate: Tue Oct 14 11:32:57 2025 +0800
sched/signal: Remove shadow definitions to reduce unnecessary API
Reduce unnecessary API definitions:
nxsig_waitinfo() -> nxsig_timedwait()
Signed-off-by: chao an <[email protected]>
---
Documentation/reference/os/app_vs_os.rst | 7 -------
fs/vfs/fs_signalfd.c | 2 +-
include/nuttx/signal.h | 26 --------------------------
sched/sched/sched_waitid.c | 2 +-
sched/sched/sched_waitpid.c | 2 +-
sched/signal/sig_pause.c | 4 ++--
6 files changed, 5 insertions(+), 38 deletions(-)
diff --git a/Documentation/reference/os/app_vs_os.rst
b/Documentation/reference/os/app_vs_os.rst
index e45e9b4a19c..27052ab5302 100644
--- a/Documentation/reference/os/app_vs_os.rst
+++ b/Documentation/reference/os/app_vs_os.rst
@@ -73,13 +73,6 @@ not be used by application logic. Some examples include:
``include/nuttx/semaphore.h`` for other internal OS interfaces
for semaphores).
-- ``nxsig_waitinfo()``: functionally
- equivalent to the standard application interface
- ``sigwaitinfo()``. However, ``nxsig_waitinfo()`` will not
- modify the errno value and will not cause a cancellation point
- (see ``include/nuttx/signal.h`` for other internal OS
- interfaces for signals).
-
- ``nxmq_send()``: functionally equivalent
to the standard application interface ``mq_send()``. However,
``nxmq_send()`` will not modify the errno value and will not
diff --git a/fs/vfs/fs_signalfd.c b/fs/vfs/fs_signalfd.c
index 116c653e8ac..ad8ab46a2dc 100644
--- a/fs/vfs/fs_signalfd.c
+++ b/fs/vfs/fs_signalfd.c
@@ -195,7 +195,7 @@ static ssize_t signalfd_file_read(FAR struct file *filep,
siginfo = (FAR struct signalfd_siginfo *)buffer;
do
{
- ret = nxsig_waitinfo(&pendmask, &info);
+ ret = nxsig_timedwait(&pendmask, &info, NULL);
if (ret < 0)
{
goto errout;
diff --git a/include/nuttx/signal.h b/include/nuttx/signal.h
index 5a1dd4751ea..79fa22b39d5 100644
--- a/include/nuttx/signal.h
+++ b/include/nuttx/signal.h
@@ -443,32 +443,6 @@ int nxsig_kill(pid_t pid, int signo);
int nxsig_tgkill(pid_t pid, pid_t tid, int signo);
-/****************************************************************************
- * Name: nxsig_waitinfo
- *
- * Description:
- * This function is equivalent to nxsig_timedwait with a NULL timeout
- * parameter.
- *
- * This is an internal OS interface. It is functionally equivalent to
- * sigwaitinfo() except that:
- *
- * - It is not a cancellation point, and
- * - It does not modify the errno value.
- *
- * Input Parameters:
- * set - The pending signal set
- * info - The returned value
- *
- * Returned 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.
- *
- ****************************************************************************/
-
-#define nxsig_waitinfo(s,i) nxsig_timedwait(s,i,NULL)
-
/****************************************************************************
* Name: nxsig_clockwait
*
diff --git a/sched/sched/sched_waitid.c b/sched/sched/sched_waitid.c
index f47a2f9ec45..72ee9f38e93 100644
--- a/sched/sched/sched_waitid.c
+++ b/sched/sched/sched_waitid.c
@@ -386,7 +386,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info,
int options)
/* Wait for any death-of-child signal */
- ret = nxsig_waitinfo(&set, info);
+ ret = nxsig_timedwait(&set, info, NULL);
if (ret < 0)
{
errcode = -ret;
diff --git a/sched/sched/sched_waitpid.c b/sched/sched/sched_waitpid.c
index db2b0aea84a..45a7a21ae96 100644
--- a/sched/sched/sched_waitpid.c
+++ b/sched/sched/sched_waitpid.c
@@ -428,7 +428,7 @@ pid_t nxsched_waitpid(pid_t pid, int *stat_loc, int options)
/* Wait for any death-of-child signal */
- ret = nxsig_waitinfo(&set, &info);
+ ret = nxsig_timedwait(&set, &info, NULL);
if (ret < 0)
{
goto errout;
diff --git a/sched/signal/sig_pause.c b/sched/signal/sig_pause.c
index edf47aa08ef..a72ecb32cf5 100644
--- a/sched/signal/sig_pause.c
+++ b/sched/signal/sig_pause.c
@@ -77,11 +77,11 @@ int pause(void)
sigemptyset(&set);
- /* sigtwaitinfo() cannot succeed. It should always return error EINTR
+ /* nxsig_timedwait() cannot succeed. It should always return error EINTR
* meaning that some unblocked signal was caught.
*/
- ret = nxsig_waitinfo(&set, NULL);
+ ret = nxsig_timedwait(&set, NULL, NULL);
if (ret < 0)
{
set_errno(-ret);