From 28048304a4d32cff6bb4b66b27e5a2469ae08319 Mon Sep 17 00:00:00 2001 From: tedu Date: Fri, 3 Jan 2014 15:35:23 +0000 Subject: [PATCH] some more information, based on a diff by sven falempin --- lib/libpthread/man/pthread_mutex_init.3 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/libpthread/man/pthread_mutex_init.3 b/lib/libpthread/man/pthread_mutex_init.3 index 5567248184b..a4f66a37628 100644 --- a/lib/libpthread/man/pthread_mutex_init.3 +++ b/lib/libpthread/man/pthread_mutex_init.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pthread_mutex_init.3,v 1.12 2013/06/05 03:44:50 tedu Exp $ +.\" $OpenBSD: pthread_mutex_init.3,v 1.13 2014/01/03 15:35:23 tedu Exp $ .\" .\" Copyright (c) 1997 Brian Cully .\" All rights reserved. @@ -29,7 +29,7 @@ .\" .\" $FreeBSD: pthread_mutex_init.3,v 1.6 1999/08/28 00:03:07 peter Exp $ .\" -.Dd $Mdocdate: June 5 2013 $ +.Dd $Mdocdate: January 3 2014 $ .Dt PTHREAD_MUTEX_INIT 3 .Os .Sh NAME @@ -48,7 +48,13 @@ If .Fa attr is .Dv NULL -the default attributes are used. +the default attributes are used, otherwise +.Fa attr +should be initialized by calling +.Xr pthread_mutexattr_init 3 . +.Pp +A mutex may also be initialized by assignment with the macro +PTHREAD_MUTEX_INITIALIZER. .Sh RETURN VALUES If successful, .Fn pthread_mutex_init @@ -67,6 +73,7 @@ is invalid. The process cannot allocate enough memory to create another mutex. .El .Sh SEE ALSO +.Xr pthread_mutexattr_init 3 , .Xr pthread_mutex_destroy 3 , .Xr pthread_mutex_lock 3 , .Xr pthread_mutex_unlock 3 -- 2.20.1