Query: pthread_condattr_getpshared
OS: osf1
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
pthread_condattr_getpshared(3) Library Functions Manual pthread_condattr_getpshared(3)NAMEpthread_condattr_getpshared - Obtain the process-shared attribute of a condition variable attributes object.LIBRARYDECthreads POSIX 1003.1c Library (libpthread.so)SYNOPSIS#include <pthread.h> int pthread_condattr_getpshared( const pthread_condattr_t attr, int *pshared);PARAMETERSAddress of the condition variable attributes object whose process-shared attribute is to be obtained. Location to store the value of the process-shared attribute of attr.DESCRIPTIONThis routine obtains the value of the process-shared attribute in the condition variable attributes object referenced by attr and stores it at the location pshared. The object referenced by attr must be initialized before this routine is called. Creating a condition variable whose process-shared attribute is set to PTHREAD_PROCESS_PRIVATE permits it to be operated on by threads cre- ated within the same process as the thread that initialized that condition variable. If threads other than processes attempt to operate on such a condition variable, the behavior is undefined. The default value of the process-shared attribute of an initialized condition variable attributes object is PTHREAD_PROCESS_PRIVATE. Creating a condition variable whose process-shared attribute is set to PTHREAD_PROCESS_SHARED permits it to be operated upon by any thread that has access to the memory where that condition variable is allocated, even if it is allocated in memory that is shared by multiple pro- cesses.RETURN VALUESIf 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.ERRORSNoneRELATED INFORMATIONFunctions: pthread_condattr_init(3), pthread_condattr_setpshared(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_condattr_getpshared(3)
Similar Topics in the Unix Linux Community |
---|
Can FD's be shared between threads? |
Why this behaviour of IF condition? |
problem about race condition |
Creating a file within a file? |