[Prev] [Contents] [Next]

pthread_setconcurrency()--Set The Process Concurrency Level

Syntax

#include <pthread.h>
int pthread_setconcurrency(int concurrency);
Threadsafe: Yes
Signal Safe: No

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

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

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

Parameters

concurrency
(Input) The new concurrency level for the process

Authorities and Locks

None.

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



[Prev] [Contents] [Next]
Copyright © 1998, IBM Corporation. All rights reserved.
Comments? Contact
rchthrds@us.ibm.com