sched/signal: Fix nxsig_ismember() return value behavior
Build Documentation / build-html (push) Has been cancelled

nxsig_ismember() has a return type of int, but the current
implementation returns a boolean value, which is incorrect.

All callers should determine membership by checking whether
the return value is 1 or 0, which is also consistent with the POSIX sigismember() API.

Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
This commit is contained in:
wangchengdong
2025-11-21 15:44:59 +08:00
committed by Xiang Xiao
parent 817e4ee354
commit ba05c7f133
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ int nxsig_ismember(FAR const sigset_t *set, int signo)
{
/* Check if the signal is in the set */
return ((set->_elem[_SIGSET_NDX(signo)] & _SIGNO2SET(signo)) != 0);
return (set->_elem[_SIGSET_NDX(signo)] & _SIGNO2SET(signo)) ? 1 : 0;
}
}