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

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

PTHREAD_MUTEX_INIT(3)

Contents


NAME    [Toc]    [Back]

     pthread_mutex_init -- create a mutex

LIBRARY    [Toc]    [Back]

     Reentrant C Library (libc_r, -lc_r)

SYNOPSIS    [Toc]    [Back]

     #include <pthread.h>

     int
     pthread_mutex_init(pthread_mutex_t *mutex,
	 const pthread_mutexattr_t *attr);

DESCRIPTION    [Toc]    [Back]

     The pthread_mutex_init() function creates a new mutex, with attributes
     specified with attr.  If attr is NULL the default attributes are used.

RETURN VALUES    [Toc]    [Back]

     If successful, pthread_mutex_init() will return zero and put the new
     mutex id into mutex, otherwise an error number will be returned to indicate
 the error.

ERRORS    [Toc]    [Back]

     The pthread_mutex_init() function will fail if:

     [EINVAL]		The value specified by attr is invalid.

     [ENOMEM]		The process cannot allocate enough memory to create
			another mutex.

     [EAGAIN]		The temporarily lacks the resources to create another
			mutex.

SEE ALSO    [Toc]    [Back]

      
      
     pthread_mutex_destroy(3), pthread_mutex_lock(3),
     pthread_mutex_trylock(3), pthread_mutex_unlock(3)

STANDARDS    [Toc]    [Back]

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


FreeBSD 5.2.1			 July 29, 1998			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
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_mutex_unlock Tru64 Unlocks the specified mutex
pthread_mutex_unlock FreeBSD unlock a mutex
pthread_mutex_lock FreeBSD lock a mutex
pthread_mutex_lock OpenBSD lock a mutex
pthread_mutex_unlock OpenBSD unlock a mutex
pthread_mutex_init Tru64 Initializes a mutex
tis_mutex_unlock Tru64 Unlocks the specified mutex
pthread_mutex_destroy Tru64 Destroys a mutex
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service