.\" 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
.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
.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 .