Index of Section 2 Manual Pages
| Interix / SUA | pthread_condattr_getpshared.2 | Interix / SUA |
pthread_condattr_getpshared(2) pthread_condattr_getpshared(2)
pthread_condattr_getpshared()
NAME
pthread_condattr_getpshared(), pthread_condattr_setpshared() - get or set
the process-shared attribute in a condition variable attributes object
SYNOPSIS
#include
int pthread_condattr_getpshared(const pthread_condattr_t *attr, int
*pshared);
int pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared);
DESCRIPTION
The pthread_condattr_setpshared(2) function sets the process-shared
attribute in the condition variable attributes object referenced by the
attr argument to the value referenced by the pshared argument. When the
process-shared attribute is set to PTHREAD_PROCESS_SHARED, the condition
variable can be acted upon by any thread that can access the memory where
the condition variable is stored, even if the condition variable is
allocated in memory shared by multiple processes. When the process-shared
attribute is set to PTHREAD_PROCESS_PRIVATE (the default), the condition
variable can be acted upon only by threads that have been created in the
same process as the thread that initialized the condition variable.
The pthread_condattr_getpshared(2) function retrieves the process-shared
attribute in the condition variable attributes object referenced by attr,
storing the value in the location referenced by the pshared argument.
IMPLEMENTATION ISSUES
In this version of Interix, this function supports only the
PTHREAD_PROCESS_PRIVATE process-shared attribute.
RETURN VALUES
On success, both functions return 0; otherwise, an error code is returned.
ERRORS
The pthread_condattr_getpshared() function can fail for the following
reason:
[EINVAL]
The attr argument is invalid.
The pthread_condattr_setpshared() function can fail for the following
reason:
[EINVAL]
The value specified by pshared is out of bounds.
Neither function returns [EINTR]..
SEE ALSO
pthread_create(2)
pthread_cond_destroy(2)
pthread_condattr_destroy(2)
pthread_mutex_destroy(2)
USAGE NOTES
All of these functions are thread safe.
None of these functions are async-signal safe.