The set_thread_limits callable service changes the calling process's limits for pthread_created threads. These limits are the maximum number of MVS™ tasks used for pthread_created threads, and the maximum number of pthread_created threads. The thread limit includes running, queued, and undetached exited threads.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1STL): | 31-bit |
AMODE (BPX4STL): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4STL with the same parameters.
When the Action that is specified is STL_MAX_TASKS or STL_SET_BOTH, this is the name of a fullword that contains the new MaxThreadTasks value for the caller's process.
When the Action that is specified is STL_MAX_THREADS or STL_SET_BOTH, this is the name of a fullword that contains the new MaxThreads value for the caller's process.
The name of a fullword in which the set_thread_limits service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EINVAL | The value that was specified for Action, MaxThreadTasks, or MaxThreads is incorrect. The following reason codes can accompany the return code: JRSTLActionInvalid, JRSTLTasksInvalid or JRSTLThreadsInvalid. |
The name of a fullword in which the set_thread_limits service stores the reason code. The set_thread_limits service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
MaxThreadTasks | MaxThreads | |||
---|---|---|---|---|
Min | Max | Min | Max | |
Authorized | 1 | 32768 | 0 | 100000 |
Unauthorized | 1 | Parmlib | 0 | Parmlib |
Note: Parmlib represents the values
that are specified at z/OS UNIX startup
by the BPXPRMxx parmlib member.
|
There are no restrictions on the use of the set_thread_limits service.
For an example using this callable service, see BPX1STL (set_thread_limits) example.