Loading...
pthreads/pthread_mutex_unlock.3 Libc-320 Libc-583
--- Libc/Libc-320/pthreads/pthread_mutex_unlock.3
+++ Libc/Libc-583/pthreads/pthread_mutex_unlock.3
@@ -36,7 +36,9 @@
 .Sh SYNOPSIS
 .Fd #include <pthread.h>
 .Ft int
-.Fn pthread_mutex_unlock "pthread_mutex_t *mutex"
+.Fo pthread_mutex_unlock
+.Fa "pthread_mutex_t *mutex"
+.Fc
 .Sh DESCRIPTION
 If the current thread holds the lock on
 .Fa mutex ,
@@ -44,13 +46,20 @@
 .Fn pthread_mutex_unlock
 function unlocks
 .Fa mutex .
+.Pp
+Calling
+.Fn pthread_mutex_unlock
+with a
+.Fa mutex
+that the calling thread does not hold will result 
+in undefined behavior.
 .Sh RETURN VALUES
 If successful,
 .Fn pthread_mutex_unlock
-will return zero, otherwise an error number will be returned to
-indicate the error.
+will return zero.
+Otherwise, an error number will be returned to indicate the error.
 .Sh ERRORS
-.Fn pthread_mutex_trylock
+.Fn pthread_mutex_unlock
 will fail if:
 .Bl -tag -width Er
 .It Bq Er EINVAL