This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 78c2eaf3e9ae8d3b70acac5afa9a524bc45fe918 Author: Marco Casaroli <[email protected]> AuthorDate: Sat Oct 17 20:08:23 2026 +0200 include/nuttx: Do not use OK in inline functions of mutex.h and signal.h. stdio.h, pthread.h and other standard headers include nuttx/mutex.h and nuttx/signal.h. Four inline functions in these headers return OK, so a program that includes a standard header needs the name OK from sys/types.h. Return 0. The behavior does not change. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- include/nuttx/mutex.h | 4 ++-- include/nuttx/signal.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/nuttx/mutex.h b/include/nuttx/mutex.h index bd870c071d0..c9e75ce38f7 100644 --- a/include/nuttx/mutex.h +++ b/include/nuttx/mutex.h @@ -608,7 +608,7 @@ static inline_function void nxmutex_reset(FAR mutex_t *mutex) static inline_function int nxmutex_breaklock(FAR mutex_t *mutex, FAR unsigned int *locked) { - int ret = OK; + int ret; *locked = false; ret = nxmutex_unlock(mutex); @@ -640,7 +640,7 @@ static inline_function int nxmutex_breaklock(FAR mutex_t *mutex, static inline_function int nxmutex_restorelock(FAR mutex_t *mutex, unsigned int locked) { - return locked ? nxmutex_lock(mutex) : OK; + return locked ? nxmutex_lock(mutex) : 0; } /**************************************************************************** diff --git a/include/nuttx/signal.h b/include/nuttx/signal.h index 7c334517be5..94db03d0afc 100644 --- a/include/nuttx/signal.h +++ b/include/nuttx/signal.h @@ -205,7 +205,7 @@ static inline int nxsig_addset(FAR sigset_t *set, int signo) } set->_elem[_SIGSET_NDX(signo)] |= _SIGNO2SET(signo); - return OK; + return 0; } /**************************************************************************** @@ -238,7 +238,7 @@ static inline int nxsig_delset(FAR sigset_t *set, int signo) } set->_elem[_SIGSET_NDX(signo)] &= ~_SIGNO2SET(signo); - return OK; + return 0; } /****************************************************************************
