]> git.saurik.com Git - apple/libpthread.git/blobdiff - man/pthread_mutex_init.3
libpthread-454.100.8.tar.gz
[apple/libpthread.git] / man / pthread_mutex_init.3
index bebe8a27ef456dfd1981d26d2deb0371804da338..81c4a0017d1190b288881d0a089d52010b52405d 100644 (file)
 .\" 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 <pthread.h>
+.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 .