Open System Services System Calls Reference Manual (G06.25+, H06.03+)
pthread_getconcurrency(2) OSS System Calls Reference Manual
NAME
pthread_getconcurrency
- Gets 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_getconcurrency(void);
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
The pthread_getconcurrency() function always returns the concurrency level set by a previous
call to pthread_setconcurrency(). If the pthread_setconcurrency() function has never been
called, pthread_getconcurrency() returns zero.
RELATED INFORMATION
Functions: pthread_setconcurrency(2).
5−64 Hewlett-Packard Company 527186-003