mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
include/nuttx/semaphore.h: Fix broken macros
This commit is contained in:
@@ -160,11 +160,7 @@ int sem_reset(FAR sem_t *sem, int16_t count);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_PRIORITY_INHERITANCE
|
||||
int sem_getprotocol(FAR sem_t *sem, FAR int *protocol);
|
||||
#else
|
||||
# define sem_getprotocol(s,p) do { *(p) == SEM_PRIO_NONE); } while (0)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Function: sem_setprotocol
|
||||
@@ -202,11 +198,7 @@ int sem_getprotocol(FAR sem_t *sem, FAR int *protocol);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_PRIORITY_INHERITANCE
|
||||
int sem_setprotocol(FAR sem_t *sem, int protocol);
|
||||
#else
|
||||
# define sem_setprotocol(s,p) ((p) == SEM_PRIO_NONE ? 0 : -ENOSYS);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user