*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> pthread_mutex_lock (3)              
Title
Content
Arch
Section
 

PTHREAD_MUTEX_LOCK(3)

Contents


NAME    [Toc]    [Back]

     pthread_mutex_lock -- lock a mutex

LIBRARY    [Toc]    [Back]

     Reentrant C Library (libc_r, -lc_r)

SYNOPSIS    [Toc]    [Back]

     #include <pthread.h>

     int
     pthread_mutex_lock(pthread_mutex_t *mutex);

DESCRIPTION    [Toc]    [Back]

     The pthread_mutex_lock() function locks mutex.  If the mutex is already
     locked, the calling thread will block until the mutex becomes available.

RETURN VALUES    [Toc]    [Back]

     If successful, pthread_mutex_lock() will return zero, otherwise an error
     number will be returned to indicate the error.

ERRORS    [Toc]    [Back]

     The pthread_mutex_lock() function will fail if:

     [EINVAL]		The value specified by mutex is invalid.

     [EDEADLK]		A deadlock would occur if the thread blocked waiting
			for mutex.

SEE ALSO    [Toc]    [Back]

      
      
     pthread_mutex_destroy(3), pthread_mutex_init(3),
     pthread_mutex_trylock(3), pthread_mutex_unlock(3)

STANDARDS    [Toc]    [Back]

     The pthread_mutex_lock() function conforms to ISO/IEC 9945-1:1996
     (``POSIX.1'').


FreeBSD 5.2.1			 July 30, 1998			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
tis_mutex_trylock Tru64 Attempts to lock the specified mutex
pthread_mutex_trylock OpenBSD attempt to lock a mutex without blocking
pthread_mutex_trylock FreeBSD attempt to lock a mutex without blocking
pthread_mutex_trylock Tru64 Attempts to lock the specified mutex, without waiting if already locked
pthread_mutexattr_gettype Tru64 Obtains the mutex type attribute in the specified mutex attributes object
pthread_mutexattr_settype Tru64 Specifies the mutex type attribute that is used when a mutex is created
pthread_rwlock_wrlock IRIX lock a read-write lock object for writing
pthread_rwlock_rdlock IRIX lock a read-write lock object for reading
tis_read_trylock Tru64 Attempts to acquire a read-write lock for read access and does not wait if the lock cannot be immedi...
pthread_mutex_init OpenBSD create a mutex
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service