From 35886c18ab5ef63c2b15804e160ec2ee2a818dfd Mon Sep 17 00:00:00 2001 From: makejian Date: Mon, 4 Aug 2025 16:34:21 +0800 Subject: [PATCH] nuttx/mutex: correct documentation for nxmutex_destroy Correct and clarify the documentation note for nxmutex_destroy function to properly document behavior and safety considerations in OS context. Signed-off-by: makejian --- include/nuttx/mutex.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/nuttx/mutex.h b/include/nuttx/mutex.h index f2727f8395b..b8785c8658b 100644 --- a/include/nuttx/mutex.h +++ b/include/nuttx/mutex.h @@ -461,10 +461,10 @@ static inline_function bool nxmutex_is_locked(FAR mutex_t *mutex) * Name: nxmutex_destroy * * Description: - * This function initializes the UNNAMED mutex. Following a - * successful call to nxmutex_init(), the mutex may be used in subsequent - * calls to nxmutex_lock(), nxmutex_unlock(), and nxmutex_trylock(). The - * mutex remains usable until it is destroyed. + * This function destroys the specified mutex. After a successful call, + * the mutex is no longer valid and must not be used in subsequent calls + * to nxmutex_lock(), nxmutex_unlock(), or nxmutex_trylock() unless it is + * reinitialized with nxmutex_init(). * * Parameters: * mutex - Semaphore to be destroyed