X-Git-Url: https://git.saurik.com/apple/libpthread.git/blobdiff_plain/f1a1da6cf65a9d0e6858678f6c259025cf5d27fd..HEAD:/man/pthread_mutex_init.3 diff --git a/man/pthread_mutex_init.3 b/man/pthread_mutex_init.3 index bebe8a2..81c4a00 100644 --- a/man/pthread_mutex_init.3 +++ b/man/pthread_mutex_init.3 @@ -25,21 +25,18 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc_r/man/pthread_mutex_init.3,v 1.6.2.4 2001/08/17 15:42:51 ru Exp $ +.\" $FreeBSD$ .\" -.Dd July 29, 1998 +.Dd November 4, 2006 .Dt PTHREAD_MUTEX_INIT 3 .Os .Sh NAME .Nm pthread_mutex_init .Nd create a mutex .Sh SYNOPSIS -.Fd #include +.In pthread.h .Ft int -.Fo pthread_mutex_init -.Fa "pthread_mutex_t *restrict mutex" -.Fa "const pthread_mutexattr_t *restrict attr" -.Fc +.Fn pthread_mutex_init "pthread_mutex_t *mutex" "const pthread_mutexattr_t *attr" .Sh DESCRIPTION The .Fn pthread_mutex_init @@ -47,19 +44,18 @@ function creates a new mutex, with attributes specified with .Fa attr . If .Fa attr -is NULL, the default attributes are used. +is NULL the default attributes are used. .Sh RETURN VALUES If successful, .Fn pthread_mutex_init will return zero and put the new mutex id into -.Fa mutex . -Otherwise, an error number will be returned to indicate the error. +.Fa mutex , +otherwise an error number will be returned to indicate the error. .Sh ERRORS +The .Fn pthread_mutex_init -will fail if: +function will fail if: .Bl -tag -width Er -.It Bq Er EAGAIN -The system temporarily lacks the resources to create another mutex. .It Bq Er EINVAL The value specified by .Fa attr @@ -71,8 +67,10 @@ The process cannot allocate enough memory to create another mutex. .Xr pthread_mutex_destroy 3 , .Xr pthread_mutex_lock 3 , .Xr pthread_mutex_trylock 3 , -.Xr pthread_mutex_unlock 3 +.Xr pthread_mutex_unlock 3 , +.Xr pthread_mutexattr 3 .Sh STANDARDS +The .Fn pthread_mutex_init -conforms to +function conforms to .St -p1003.1-96 .