pthread_rwlockattr_getpshared man page on SmartOS

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

PTHREAD_RWLOCKATTR_GETPSHARED(3C)	     PTHREAD_RWLOCKATTR_GETPSHARED(3C)

NAME
       pthread_rwlockattr_getpshared,  pthread_rwlockattr_setpshared  - get or
       set process-shared attribute of read-write lock attributes object

SYNOPSIS
       cc -mt [ flag... ] file... -lpthread [ library... ]
       #include <pthread.h>

       int pthread_rwlockattr_getpshared(
	    const pthread_rwlockattr_t *restrict attr,
	    int *restrict pshared);

       int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr,
	    int pshared);

DESCRIPTION
       The process-shared attribute is set to  PTHREAD_PROCESS_SHARED to  per‐
       mit 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 pro‐
       cesses. If the process-shared  attribute	 is   PTHREAD_PROCESS_PRIVATE,
       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 PTHREAD_PROCESS_PRIVATE.

       The  pthread_rwlockattr_getpshared()  function obtains the value of the
       process-shared attribute from the initialised attributes object	refer‐
       enced by attr. The  pthread_rwlockattr_setpshared() function is used to
       set the process-shared attribute in an  initialised  attributes	object
       referenced by attr.

RETURN VALUES
       If successful, the  pthread_rwlockattr_setpshared() function returns 0.
       Otherwise, an error number is returned to indicate the error.

       Upon  successful	  completion,	the    pthread_rwlockattr_getpshared()
       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.

ERRORS
       The pthread_rwlockattr_getpshared() and pthread_rwlockattr_setpshared()
       functions will fail if:

       EINVAL
		 The value specified by attr  or pshared is invalid.

ATTRIBUTES
       See  attributes(5) for descriptions of the following attributes:

       ┌────────────────────┬─────────────────┐
       │  ATTRIBUTE TYPE    │ ATTRIBUTE VALUE │
       ├────────────────────┼─────────────────┤
       │Interface Stability │ Standard	      │
       ├────────────────────┼─────────────────┤
       │MT-Level	    │ MT-Safe	      │
       └────────────────────┴─────────────────┘

SEE ALSO
       pthread_rwlock_init(3C),			    pthread_rwlock_rdlock(3C),
       pthread_rwlock_unlock(3C),  pthread_rwlock_wrlock(3C),  pthread_rwlock‐
       attr_init(3C), attributes(5), standards(5)

				 Mar 23, 2005PTHREAD_RWLOCKATTR_GETPSHARED(3C)
[top]

List of man pages available for SmartOS

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