pthread_rwlock_wrlock man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



pthread_rwlock_wrlock(3P)			     pthread_rwlock_wrlock(3P)

NAME
     pthread_rwlock_wrlock, pthread_rwlock_trywrlock - lock a read-write lock
     object for writing

C SYNOPSIS
     #include <pthread.h>

     int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock);

     int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock);

DESCRIPTION
     Read-write locks allow a thread to exclusively lock some shared data
     while updating that data, or allow any number of threads to have
     simultaneous read-only access to the data.	 The pthread_rwlock_wrlock()
     and pthread_rwlock_trywrlock() functions apply a write lock to the read-
     write lock object referenced by rwlock.  The calling thread will only
     acquire the lock if no other thread (reader or writer) holds the lock.  A
     thread that calls pthread_rwlock_wrlock() will block until it can gain
     the read-write lock for writing, and retains ownership until it calls
     pthread_rwlock_unlock().  Only the thread that locked a read-write lock
     should unlock it.	When unlocked, if there are both readers and writers
     of the same priority waiting for the read-write lock, writers will be
     scheduled before readers.

     If a thread waiting for a read-write lock receives a signal, upon return
     from the signal handler, the thread resumes waiting for the read-write
     lock as if there was no interrupt.

DIAGNOSTICS
     All of the read-write lock functions return zero if successful;
     otherwise, an error number is returned.

     pthread_rwlock_trywrlock() can return the following error:

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

SEE ALSO
     pthread_rwlock_init(3P), pthread_rwlock_rdlock(3P),
     pthread_rwlock_unlock(3P), pthread_rwlockattr_init(3P),
     pthread_rwlockattr_setpshared(3P).

									Page 1

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net