mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()
sim/rpserver NuttShell (NSH) NuttX-12.0.0 server> cu _assert: Current Version: NuttX server 12.0.0 3ead669e7a-dirty Feb 2 2023 23:53:48 sim _assert: Assertion failed : at file: libs/libc/misc/lib_mutex.c:303 task: cu 0x5662fff4 Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -248,12 +248,10 @@ int nxmutex_unlock(FAR mutex_t *mutex);
|
||||
* Parameters:
|
||||
* mutex - mutex descriptor.
|
||||
*
|
||||
* Return Value:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
|
||||
int nxmutex_reset(FAR mutex_t *mutex);
|
||||
void nxmutex_reset(FAR mutex_t *mutex);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -472,11 +470,9 @@ int nxrmutex_unlock(FAR rmutex_t *rmutex);
|
||||
* Parameters:
|
||||
* rmutex - rmutex descriptor.
|
||||
*
|
||||
* Return Value:
|
||||
*
|
||||
****************************************************************************/
|
||||
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
|
||||
int nxrmutex_reset(FAR rmutex_t *rmutex);
|
||||
void nxrmutex_reset(FAR rmutex_t *rmutex);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user