pthread_setconcurrency() — Set the level of concurrency

Standards

Standards / Extensions C or C++ Dependencies

Single UNIX Specification, version 3

both

z/OS V1R7
POSIX(ON)

Format

#define _OPEN_THREADS 2
#include <pthread.h>

int pthread_setconcurrency(int new_level);

General description

pthread_setconcurrency() sets the desired thread concurrency level to new_level.

Usage notes

  1. z/OS® UNIX does not support multiplexing POSIX threads onto TCBs. If successful, pthread_setconcurrency() saves new_level for subsequent calls to pthread_getconcurrency() but takes no other action. For related information on the relationship between pthreads and TCBs, see pthread_attr_setweight_np() — Set weight of thread attribute object and pthread_attr_setsynctype_np() — Set thread sync type.

Returned value

If successful, pthread_setconcurrency() returns 0. Upon failure, returns one of the following error values:

  • EINVAL – The value specified by new_level is negative.
  • EAGAIN – The value specific by new_level would cause a system resource to be exceeded.

Related information