Standard C Library Functions pthreadbarrierattrgetpshared(3C)
NAME
pthreadbarrierattrgetpshared,
pthreadbarrierattrsetpshared - get and set process-shared
attribute of barrier attributes object
SYNOPSIS
cc -mt [ flag... ] file... [ library... ]
#include
int pthreadbarrierattrgetpshared(
const pthreadbarrierattrt *restrict attr,
int *restrict pshared);
int pthreadbarrierattrsetpshared(pthreadbarrierattrt *attr,
int pshared);
DESCRIPTION
The pthreadbarrierattrgetpshared() function obtains the
value of the process-shared attribute from the attributes
object referenced by attr. The
pthreadbarrierattrsetpshared() function sets the process-
shared attribute in an initialized attributes object refer-
enced by attr.
The process-shared attribute is set to
PTHREADPROCESHARED to permit a barrier to be operated
upon by any thread that has access to the memory where the
barrier is allocated. If the process-shared attribute is
PTHREADPROCESPRIVATE, the barrier will only be operated
upon by threads created within the same process as the
thread that initialized the barrier. If threads of different
processes attempt to operate on such a barrier, the behavior
is undefined.
The default value of the attribute is
PTHREADPROCESPRIVATE. Both constants
PTHREADPROCESHARED and PTHREADPROCESPRIVATE are
defined in .
No barrier attributes other than the process-shared attri-
bute are provided.
RETURN VALUES
Upon successful completion, the
pthreadbarrierattrgetpshared() function returns 0 and
stores the value of the process-shared attribute of attr
into the object referenced by the pshared parameter.
SunOS 5.11 Last change: 30 Jan 2004 1
Standard C Library Functions pthreadbarrierattrgetpshared(3C)
Otherwise, an error number is returned to indicate the
error.
Upon successful completion, the
pthreadbarrierattrsetpshared() function returns 0. Other-
wise, an error number is returned to indicate the error.
ERORS
These functions may fail if:
EINVAL The value specified by attr is invalid.
The pthreadbarrierattrsetpshared() function may fail if:
EINVAL The new value specified for the process-shared
attribute is not one of the legal values
PTHREADPROCESHARED or PTHREADPROCESPRIVATE.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Standard
MT-Level MT-Safe
SEE ALSO
pthreadbarrierinit(3C), pthreadbarrierattrdestroy(3C),
attributes(5), standards(5)
SunOS 5.11 Last change: 30 Jan 2004 2
|