BPX4STW (sigtimedwait) example

The following code will wait for signals 1-4 to arrive or 3 seconds, whichever occurs first. For the callable service, see sigtimedwait (BPX1STW, BPX4STW) — Wait for a signal with a specified timeout. AMODE 31 callers use BPX1STW (sigtimedwait) example.
                                              
         MVC   WAITMASK(8),=XL8'F000000000000000'  Signals 1-4          
         LA    R15,SIGINFO_T                                            
         STG   R15,SINFA                                                
         MVC   SECONDS,=F'3'         Wait three seconds                 
         XC    NANOSECONDS,NANOSECONDS Zero nanoseconds                 
         SPACE ,                                                        
         CALL  BPX4STW,              Signal timed wait                 +
               (WAITMASK,            Input: mask of signal to wait for +
               SINFA,                Input: address of siginfo_t area  +
               SIGINFO#LENGTH,       Input: length of siginfo_t area   +
               SECONDS,              Input: seconds to wait for sig    +
               NANOSECONDS,          Input: nanoseconds to wait for sig+
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ----------------------------------