Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: Thursday, June 13, 2019
 
 

thr_setconcurrency(3C)

Name

thr_getconcurrency, thr_setconcurrency - get or set thread concurrency level

Synopsis

#include <thread.h>

int thr_setconcurrency(int new_level);
int thr_getconcurrency(void);

Description

These functions are obsolete and maintained for compatibility only. The thr_setconcurrency() function updates the desired concurrency level for the calling process. This value does not affect the behavior of the calling process.

The thr_getconcurrency() function returns the current value for the desired concurrency level.

Return Values

The thr_getconcurrency() function always returns the current value for the desired concurrency level.

If successful, the thr_setconcurrency() function returns 0. Otherwise, a non-zero value is returned to indicate the error.

Errors

The thr_setconcurrency() function will fail if:

EAGAIN

The specified concurrency level would cause a system resource to be exceeded.

EINVAL

The value for new_level is negative.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
MT-Level
MT-Safe

See Also

thr_create(3C), attributes(7), standards(7)