Open System Services System Calls Reference Manual (G06.28+)
pthread_setconcurrency(2) OSS System Calls Reference Manual
NAME
pthread_setconcurrency
- Sets level of concurrency
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int pthread_setconcurrency(int new_level);
DESCRIPTION
Concurrency values range from 0 to MAXINT inclusive. A concurrency level of 0 suggests to
the scheduler that the minimum possible amount of concurrency is required. Concurrency levels
greater than 0 suggest an increasingly higher level of concurrency.
The current implementation of concurrency level (Con Levl) and the minimum scheduled quan-
tum is as follows:
Con Levl Minimum Scheduled Quantum
--------- ----------------------------
0Infinity
1 1 second
2 0.5 seconds
... ...
10 0.1 seconds
... ...
100 0.01 seconds
Note that the quantum is calculated using the formula, 1 / concurrency_level.
Also note that very short quantums may affect process throughput due to scheduling overhead.
RETURN VALUES
If successful, the pthread_setconcurrency() function returns 0 (zero). Otherwise, an error
number is returned to indicate the error.
ERRORS
The pthread_setconcurrency() function will fail if:
[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
Functions: pthread_getconcurrency(2).
5−94 Hewlett-Packard Company 527186-005