This is an automated email from the ASF dual-hosted git repository.
ligd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 35886c18ab5 nuttx/mutex: correct documentation for nxmutex_destroy
35886c18ab5 is described below
commit 35886c18ab5ef63c2b15804e160ec2ee2a818dfd
Author: makejian <[email protected]>
AuthorDate: Mon Aug 4 16:34:21 2025 +0800
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 <[email protected]>
---
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