pthread_attr_getsynctype_np() — Get thread sync type
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
z/OS® UNIX | both | POSIX(ON) |
Format
#define _OPEN_SYS
#include <pthread.h>
int pthread_attr_getsynctype_np(pthread_attr_t *attr);
General description
The pthread_attr_getsynctype_np function returns the current 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.
Returned value
If successful, pthread_attr_getsynctype_np() returns the synctype value of the thread attribute object.
If unsuccessful, pthread_attr_getsynctype_np() returns -1.
There are no documented errno values. Use perror() or strerror() to determine cause of the error.