summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pthread_mutex_destroy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pthread_mutex_destroy.c b/pthread_mutex_destroy.c
index c9c1426..22d78a1 100644
--- a/pthread_mutex_destroy.c
+++ b/pthread_mutex_destroy.c
@@ -62,7 +62,7 @@ pthread_mutex_destroy(pthread_mutex_t *mutex)
/*
* The mutex type may not be RECURSIVE therefore trylock may return EBUSY if
* we already own the mutex. Here we are assuming that it's OK to destroy
- * a mutex that we own and have locked recursively. Is this correct?
+ * a mutex that we own and have locked recursively.
*
* For FAST mutexes we record the owner as ANONYMOUS for speed. In this
* case we assume that the thread calling pthread_mutex_destroy() is the
@@ -78,6 +78,10 @@ pthread_mutex_destroy(pthread_mutex_t *mutex)
* be too late invalidating the mutex below since another thread
* may already have entered mutex_lock and the check for a valid
* *mutex != NULL.
+ *
+ * Note that this would be an unusual situation because it is not
+ * common that mutexes are destroyed while they are still in
+ * use by other threads.
*/
*mutex = NULL;