Standards
Standards / Extensions |
C or C++ |
Dependencies |
z/OS® UNIX |
both |
POSIX(ON)
|
Format
#define _OPEN_SYS
#include <pthread.h>
int pthread_attr_setsynctype_np(pthread_attr_t *attr, int synctype);
General description
The pthread_attr_setsynctype_np
function allows you to alter the synctype setting of the attr thread
attribute object.
The
synctype can
be set to one of the following symbolics, as defined in the pthread.h
header file:
- __PTATSYNCHRONOUS
- Can only create as many threads as TCBs available (or as many
threads are available, depending on which number is smaller).
- __PTATASYNCHRONOUS
- Allows threads to be queued, that is,
can create more threads than TCBs are available up to limit of how
many threads are available. The queued threads will be released as
TCBs become available. While threads are on the queue, they can still
be affected by other pthread functions.
Returned value
If successful, pthread_attr_setsynctype_np()
returns 0.
If unsuccessful, pthread_attr_setsynctype_np() returns
-1.
There are no documented errno values. Use perror() or strerror()
to determine cause of the error.