The aio_suspend callable service suspends the calling thread until a specified asynchronous I/O event, specified timeout, or signal occurs.
Operation | Environment |
---|---|
Authorization: | Problem program or supervisor state, PSW key when the process was created (not PSW key 0) |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1ASP): | 31-bit |
AMODE (BPX4ASP): | 64-bit |
ASC mode: | Primary address space control (ASC) 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 BPX4ASP with the same parameters.
The name of a list of 31(64)-bit pointers. Each pointer in the list is the address of an Aiocb. Each Aiocb represents a previously submitted asynchronous I/O operation that the thread is to wait on for completion. The number of Aiocb pointers in the list is represented by the Aiocb_Ptr_Count parameter.
The name of a fullword that contains the number of pointers in the Aiocb_Ptr_List. If you do not want to wait on any asynchronous I/O requests, define Aiocb_Ptr_Count as the name of a fullword that contains 0.
The name of a fullword that contains an unsigned integer that is the maximum number of seconds the calling program is willing to wait for one of specified asynchronous I/O events to occur.
The name of a fullword that contains an unsigned integer that is the number of nanoseconds to be added to the value specified by the Seconds parameter.
The name of a fullword in which the aio_suspend service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EINVAL | One or more of the specified parameters are not valid. The following reason codes unique to the aio_suspend service can accompany the return code: JrNanoSecondsTooBig, JrMaxAiocbECB. |
EFAULT | One of the parameters specified contains the address of a storage area that is not accessible to the caller. The following reason codes unique to the aio_suspend service can accompany the return code: JrOK, JrBadAioEcb. |
EINTR | The service was interrupted by a signal. One or more of the specified asynchronous I/O requests may have completed. |
EAGAIN | The service timed out before any of the specified asynchronous I/O requests had completed. |
The name of a fullword in which the aio_suspend service stores the reason code. The aio_suspend 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.
None.
For an example that uses this callable service, see BPX1ASP (aio_suspend) example.