.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/lib/libc_r/man/pthread_mutex_lock.3,v 1.5.2.4 2001/08/17 15:42:51 ru Exp $
+.\" $FreeBSD$
.\"
-.Dd July 30, 1998
+.Dd January 31, 2006
.Dt PTHREAD_MUTEX_LOCK 3
.Os
.Sh NAME
.Nm pthread_mutex_lock
.Nd lock a mutex
.Sh SYNOPSIS
-.Fd #include <pthread.h>
+.In pthread.h
.Ft int
-.Fo pthread_mutex_lock
-.Fa "pthread_mutex_t *mutex"
-.Fc
+.Fn pthread_mutex_lock "pthread_mutex_t *mutex"
.Sh DESCRIPTION
The
.Fn pthread_mutex_lock
.Sh RETURN VALUES
If successful,
.Fn pthread_mutex_lock
-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
+The
.Fn pthread_mutex_lock
-will fail if:
+function will fail if:
.Bl -tag -width Er
-.It Bq Er EDEADLK
-A deadlock would occur if the thread blocked waiting for
-.Fa mutex .
.It Bq Er EINVAL
The value specified by
.Fa mutex
is invalid.
+.It Bq Er EDEADLK
+A deadlock would occur if the thread blocked waiting for
+.Fa mutex .
.El
.Sh SEE ALSO
.Xr pthread_mutex_destroy 3 ,
.Xr pthread_mutex_trylock 3 ,
.Xr pthread_mutex_unlock 3
.Sh STANDARDS
+The
.Fn pthread_mutex_lock
-conforms to
+function conforms to
.St -p1003.1-96 .