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

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

Contents


pthread_rwlockattr_setpshared(3P)	     pthread_rwlockattr_setpshared(3P)


NAME    [Toc]    [Back]

     pthread_rwlockattr_setpshared, pthread_rwlockattr_getpshared - set/get a
     read-write	lock attribute object's	process-shared attribute

C SYNOPSIS    [Toc]    [Back]

     #include <pthread.h>

     int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr,
	  int pshared);

     int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *attr,
	  int *opshared);

DESCRIPTION    [Toc]    [Back]

     These functions manipulate	the initialized	read-write lock	attribute
     object attr [see pthread_rwlockattr_init()].

     The function pthread_rwlockattr_setpshared() sets the process-shared
     attribute value of	the read-write lock.  The attribute value may be
     PTHREAD_PROCESS_PRIVATE or	PTHREAD_PROCESS_SHARED.

     The function pthread_rwlockattr_getpshared() returns the process-shared
     attribute value of	attr via opshared.  The	default	value is
     PTHREAD_PROCESS_PRIVATE.

     A read-write lock with a process-shared attribute of
     PTHREAD_PROCESS_PRIVATE may only be operated on by	threads	created	within
     the same process as the thread which initialized the read-write lock.

     A read-write lock with a process-shared attribute of
     PTHREAD_PROCESS_SHARED may	be operated on by any thread that has access
     to	the memory where the read-write	lock is	allocated, even	if the readwrite
 lock	is allocated in	memory that is shared by multiple processes.

DIAGNOSTICS    [Toc]    [Back]

     The read-write lock attribute process-shared functions return zero	on
     success; otherwise, an error number is returned:

     [EINVAL]	    The	attribute value	specified by pshared is	invalid.

SEE ALSO    [Toc]    [Back]

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


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service