BPX4CTW (cond_timed_wait) example
The following code suspends the calling thread until a
signal arrives (CW_INTRPT), or else 2.5 seconds have elapsed.
For the callable service, see cond_timed_wait (BPX1CTW, BPX4CTW) — Suspend a thread for a limited time or an event.
AMODE 31 callers use BPX1CTW (cond_timed_wait) example.
MVC EVENTLIST,=A(CW_INTRPT) Signals
CALL BPX4CTW, Wait for condition events +
(=A(2), Input: Number of seconds +
=A(500000000), Input: Number of nanoseconds +
EVENTLIST, Input: Event list BPXYCW +
SECONDS, Output: Unexpired seconds +
NANOSECONDS, Output: Unexpired nanoseconds +
RETVAL, Return value: 0 or -1 +
RETCODE, Return code +
RSNCODE), Reason code +
MF=(E,PLIST) ----------------------------------