sched/mutex: NXMUTEX_INITIALIZER should enable priority inheritance

and remove the unused macro PRIOINHERIT_FLAGS_DISABLE

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-10-29 19:41:51 +08:00 committed by Petro Karashchenko
parent f8d97aea9e
commit 732092570e
2 changed files with 6 additions and 8 deletions

View File

@ -36,10 +36,10 @@
* Pre-processor Definitions
****************************************************************************/
#define NXRMUTEX_NO_HOLDER (pid_t)-1
#define NXMUTEX_INITIALIZER NXSEM_INITIALIZER(1, 0)
#define NXRMUTEX_INITIALIZER {NXSEM_INITIALIZER(1, 0), \
NXRMUTEX_NO_HOLDER, 0}
#define NXRMUTEX_NO_HOLDER (pid_t)-1
#define NXMUTEX_INITIALIZER NXSEM_INITIALIZER(1, PRIOINHERIT_FLAGS_ENABLE)
#define NXRMUTEX_INITIALIZER {NXSEM_INITIALIZER(1, PRIOINHERIT_FLAGS_ENABLE), \
NXRMUTEX_NO_HOLDER, 0}
/****************************************************************************
* Public Type Definitions

View File

@ -49,10 +49,8 @@
/* Bit definitions for the struct sem_s flags field */
#define PRIOINHERIT_FLAGS_ENABLE (1 << 0) /* Bit 0: Priority inheritance
* is enabled for this semaphore. */
#define PRIOINHERIT_FLAGS_DISABLE (0 << 0) /* Bit 0: Priority inheritance
* is disabled for this semaphore. */
* is enabled for this semaphore.
*/
/****************************************************************************
* Public Type Declarations