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

  man pages->Tru64 Unix man pages -> pthread_rwlockattr_setpshared (3)              
Title
Content
Arch
Section
 

pthread_rwlockattr_setpshared(3)

Contents


NAME    [Toc]    [Back]

       pthread_rwlockattr_setpshared  -  Sets  the process-shared
       attribute in a read-write lock attributes object

SYNOPSIS    [Toc]    [Back]

       #include <pthread.h>

       int pthread_rwlockattr_setpshared(
               pthread_rwlockattr_t *attr,
               int pshared );

LIBRARY    [Toc]    [Back]

       DECthreads POSIX 1003.1c Library (libpthread.so)

PARAMETERS    [Toc]    [Back]

       Address of the read-write  lock  attributes  object  whose
       process-shared  attribute  is  to be set.  Value to set in
       the process-shared attribute of attr. Must  be  the  value
       PTHREAD_PROCESS_SHARED, to permit access to the read-write
       lock by any thread in any process that can access the memory
  where  the  lock object is allocated, or PTHREAD_PROCESS_PRIVATE,
 to permit access to the read-write lock only
       by threads in the same process as the thread that initialized
 the read-write lock object.

DESCRIPTION    [Toc]    [Back]

       This routine uses the value in pshared to set the processshared
  attribute in the read-write lock attributes object
       referenced by attr. The object referenced by attr must  be
       initialized  before  this  routine is called. The value of
       pshared   must   be   either   PTHREAD_PROCESS_SHARED   or
       PTHREAD_PROCESS_PRIVATE,   as  defined  in  the  pthread.h
       include file.

       If the process-shared attribute  is  set  to  PTHREAD_PROCESS_PRIVATE,
 the read-write lock object can only be operated
 upon by threads created within the  same  process  as
       the  thread  that  initialized the read-write lock object.
       If threads of differing processes attempt  to  operate  on
       such  a read-write lock object, the behavior is undefined.

       The default value of the  process-shared  attribute  of  a
       read-write  lock attributes object is PTHREAD_PROCESS_PRIVATE.


       If the  process-shared  attribute  of  a  read-write  lock
       attributes  object  is  set to PTHREAD_PROCESS_SHARED, the
       read-write lock object can be operated upon by any  thread
       that  has  access to the memory where that object is allocated,
 even if that object is allocated in memory that  is
       shared by multiple processes.

RETURN VALUES    [Toc]    [Back]

       If  an  error  condition  occurs,  this routine returns an
       integer value  indicating  the  type  of  error.  Possible
       return  values are as follows: Successful completion.  The
       value specified by attr is not a valid attributes  object,
       or  the value pshared is outside the range of legal values
       for that attribute.



ERRORS    [Toc]    [Back]

       None

SEE ALSO    [Toc]    [Back]

      
      
       Functions:               pthread_rwlockattr_getpshared(3),
       pthread_rwlockattr_init(3)

       Manuals: Guide to DECthreads and Programmer's Guide



                                 pthread_rwlockattr_setpshared(3)
[ Back ]
 Similar pages
Name OS Title
pthread_mutexattr_setpshared Tru64 Sets the process-shared attribute of a mutex attributes object
ipcrm FreeBSD remove the specified message queues, semaphore sets, and shared segments
ipcrm OpenBSD remove the specified message queues, semaphore sets, and shared memory segments
pthread_rwlockattr_setpshared OpenBSD set the process shared attribute
pthread_rwlockattr_getpshared Tru64 Obtains the process-shared
pthread_rwlockattr_setpshared FreeBSD set the process shared attribute
pthread_rwlockattr_getpshared FreeBSD get the process shared attribute
pthread_rwlockattr_getpshared OpenBSD get the process shared attribute
pthread_mutexattr_getpshared Tru64 Obtains the process-shared attribute of a mutex attributes object
shmseg HP-UX maximum number of System V shared memory segments per process
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service