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

  man pages->IRIX man pages -> pthread_rwlock_init (3p)              
Title
Content
Arch
Section
 

Contents


pthread_rwlock_init(3P)				       pthread_rwlock_init(3P)


NAME    [Toc]    [Back]

     pthread_rwlock_init, pthread_rwlock_destroy - initialize/destroy a	readwrite
 lock	object

C SYNOPSIS    [Toc]    [Back]

     #include <pthread.h>

     int pthread_rwlock_init(pthread_rwlock_t *rwlock,
	  pthread_rwlockattr_t *attr);

     int pthread_rwlock_destroy(pthread_rwlock_t *rwlock);

DESCRIPTION    [Toc]    [Back]

     Read-write	locks may be initialized either	dynamically, by	calling
     pthread_rwlock_init(), or statically, via the macro
     PTHREAD_RWLOCK_INITIALIZER.

     The personality of	the read-write lock is determined by the attribute
     structure attr passed with	the call to pthread_rwlock_init().  These
     attributes	are set	by calls to pthread_rwlockattr_init() and the various
     pthread read-write	lock attribute functions.  If attr is null (or the
     read-write	lock is	statically initialized), the default attributes	are
     used.

     The routine pthread_rwlock_destroy() uninitializes	the read-write lock
     object referenced by rwlock.

DIAGNOSTICS    [Toc]    [Back]

     The read-write lock object	functions return zero if successful;
     otherwise,	an error number	is returned.

     pthread_rwlock_destroy() can return the following error:

     [EBUSY]	    The	read-write lock	is currently held by any thread.

SEE ALSO    [Toc]    [Back]

      
      
     pthread_rwlock_rdlock(3P),	pthread_rwlock_wrlock(3P),
     pthread_rwlock_unlock(3P),	pthread_rwlockattr_init(3P),
     pthread_rwlockattr_setpshared(3P).


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
pthread_mutexattr_init IRIX initialize/destroy a mutex attribute object
pthread_condattr_init IRIX initialize/destroy a condition variable attribute object
pthread_rwlockattr_init Tru64 Initialize a read-write lock attributes object
pthread_rwlock_trywrlock Tru64 Attempts to acquire a readwrite lock for write access without waiting
pthread_rwlock_tryrdlock Tru64 Attempts to acquire a readwrite lock for read access without waiting
pthread_rwlockattr_init IRIX initialize/destroy
pthread_rwlock_wrlock IRIX lock a read-write lock object for writing
pthread_rwlock_rdlock IRIX lock a read-write lock object for reading
pthread_rwlockattr_destroy FreeBSD destroy a read/write lock
pthread_rwlock_destroy OpenBSD destroy a read/write lock
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service