MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions    pthreadrwlockattrgetpshared(3C)



NAME
     pthreadrwlockattrgetpshared, pthreadrwlockattrsetpshared
     -  get  or  set  process-shared attribute of read-write lock
     attributes object

SYNOPSIS
     cc -mt [ flag... ] file... -lpthread [ library... ]
     #include 

     int pthreadrwlockattrgetpshared(
          const pthreadrwlockattrt *restrict attr,
          int *restrict pshared);


     int pthreadrwlockattrsetpshared(pthreadrwlockattrt *attr,
          int pshared);


DESCRIPTION
     The     process-shared     attribute     is      set      to
     PTHREADPROCESHARED  to  permit  a  read-write lock to be
     operated upon by any thread that has access  to  the  memory
     where  the  read-write lock is allocated,  even if the read-
     write lock is allocated in memory that is shared by multiple
     processes.    If    the    process-shared    attribute    is
     PTHREADPROCESPRIVATE, the read-write lock  will  only  be
     operated  upon by threads created within the same process as
     the thread that initialised the read-write lock; if  threads
     of  differing  processes  attempt to operate on such a read-
     write lock, the behaviour is undefined. The default value of
     the process-shared attribute is  PTHREADPROCESPRIVATE.


     The  pthreadrwlockattrgetpshared()  function  obtains  the
     value  of  the process-shared attribute from the initialised
     attributes    object     referenced     by     attr.     The
     pthreadrwlockattrsetpshared()  function is used to set the
     process-shared attribute in an initialised attributes object
     referenced by attr.

RETURN VALUES
     If successful, the  pthreadrwlockattrsetpshared() function
     returns   0. Otherwise, an error number is returned to indi-
     cate the error.


     Upon          successful           completion,           the
     pthreadrwlockattrgetpshared()  returns   0  and stores the
     value of the  process-shared  attribute  of  attr  into  the
     object  referenced  by  the  pshared parameter. Otherwise an
     error number is returned to indicate the error.




SunOS 5.11          Last change: 23 Mar 2005                    1






Standard C Library Functions    pthreadrwlockattrgetpshared(3C)



ERORS
     The           pthreadrwlockattrgetpshared()            and
     pthreadrwlockattrsetpshared() functions will fail if:

     EINVAL    The  value  specified  by  attr   or  pshared   is
               invalid.


ATRIBUTES
     See  attributes(5) for descriptions of the following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Standard                    
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     pthreadrwlockinit(3C),          pthreadrwlockrdlock(3C),
     pthreadrwlockunlock(3C),        pthreadrwlockwrlock(3C),
     pthreadrwlockattrinit(3C), attributes(5), standards(5)




























SunOS 5.11          Last change: 23 Mar 2005                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™