pthread_setconcurrency()--Set Process Concurrency Level


  Syntax:
 #include <pthread.h>
 int pthread_setconcurrency(int concurrency);  
  Service Program Name: QP0WTCBH

  Default Public Authority: *USE

  Threadsafe: Yes

  Signal Safe: No

The pthread_setconcurrency() function sets the current concurrency level for the process.

A concurrency value of zero indicates that the threads implementation chooses the concurrency level that best suits the application. A concurrency level greater than zero indicates that the application wants to inform the system of its desired concurrency level.

The concurrency level is not used by the i5/OS threads implementation, but is stored for subsequent calls to pthread_getconcurrency(). Each user thread is always bound to a kernel thread.


Authorities and Locks

None.


Parameters

concurrency
(Input) The new concurrency level for the process

Return Value

0
pthread_setconcurrency() was successful.

value
pthread_setconcurrency() was not successful. value is set to indicate the error condition.

Error Conditions

If pthread_setconcurrency() was not successful, the error condition returned usually indicates one of the following errors. Under some conditions, the value returned could indicate an error other than those listed here.

[EINVAL]

The value specified for the argument is not correct.


Related Information



API introduced: V4R3
Top | Pthread APIs | APIs by category