mutex: align nxmutex_breaklock interface with nxrmutex_breaklock

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2024-07-03 17:09:20 +08:00 committed by Xiang Xiao
parent eee7cb6efa
commit a2b8c83e0e
2 changed files with 4 additions and 4 deletions

View file

@ -315,7 +315,7 @@ void nxmutex_reset(FAR mutex_t *mutex);
*
****************************************************************************/
int nxmutex_breaklock(FAR mutex_t *mutex, FAR bool *locked);
int nxmutex_breaklock(FAR mutex_t *mutex, FAR unsigned int *locked);
/****************************************************************************
* Name: nxmutex_restorelock
@ -334,7 +334,7 @@ int nxmutex_breaklock(FAR mutex_t *mutex, FAR bool *locked);
*
****************************************************************************/
int nxmutex_restorelock(FAR mutex_t *mutex, bool locked);
int nxmutex_restorelock(FAR mutex_t *mutex, unsigned int locked);
/****************************************************************************
* Name: nxrmutex_init

View file

@ -441,7 +441,7 @@ void nxmutex_reset(FAR mutex_t *mutex)
*
****************************************************************************/
int nxmutex_breaklock(FAR mutex_t *mutex, FAR bool *locked)
int nxmutex_breaklock(FAR mutex_t *mutex, FAR unsigned int *locked)
{
int ret = OK;
@ -475,7 +475,7 @@ int nxmutex_breaklock(FAR mutex_t *mutex, FAR bool *locked)
*
****************************************************************************/
int nxmutex_restorelock(FAR mutex_t *mutex, bool locked)
int nxmutex_restorelock(FAR mutex_t *mutex, unsigned int locked)
{
return locked ? nxmutex_lock(mutex) : OK;
}