Wait On Time (WAITTIME)


Op Code (Hex) Operand 1


0349 Wait template


Operand 1: Character(16) scalar.
Bound program access

Built-in number for WAITTIME is 66. WAITTIME ( wait_template : address )

Description

This instruction causes the thread to wait for a specified time interval. The current thread is placed in wait state for the amount of time specified by the wait template in accordance with the specified wait options.

The format of the wait template for operand 1 is:

Offset
Dec Hex
Field Name
Data Type and Length
0 0
Wait time interval
Char(8)
8 8
Wait options
Char(2)
8 8
Access state control for entering wait
Bit 0



0 = Do not modify access state
1 = Modify access state


8 8
Access state control for leaving wait
Bit 1



0 = Do not modify access state
1 = Modify access state


8 8
Multiprogramming level (MPL) control during wait
Bit 2



0 = Do not remain in current MPL set
1 = Remain in current MPL set


8 8
Asynchronous signals processing option
Bit 3



0 = Do not allow asynchronous signal processing during wait
1 = Allow asynchronous signal processing during wait


8 8
Reserved (binary 0)
Bits 4-15
10 A
Reserved (binary 0)
Char(6)
16 10
--- End ---

See Standard Time Format for additional information on the format of the wait time interval.

The access state control options control whether the process access group (PAG) will be explicitly transferred between main and auxiliary storage when entering and leaving a wait as a result of execution of this instruction. Specification of modify access state requests that the PAG be purged from main to auxiliary storage for entering a wait and requests that the PAG be transferred from auxiliary to main storage for leaving a wait. Specification of do not modify access state requests that the PAG not be explicitly transferred between main and auxiliary storage as a result of executing this instruction.

The access state of the PAG is modified when entering the wait if the process is not multi-threaded (i.e., the waiting thread is the only thread in the process), if the process' instruction wait initiation access state control attribute specifies allow access state modification, if the access state control for entering wait option specifies modify access state, and if the MPL control during wait option specifies do not remain in current MPL set.

The multiprogramming level (MPL) control during wait option controls whether the thread will be removed from the current MPL set or remain in the current MPL set when the thread enters a wait as a result of executing this instruction.

When the MPL control during wait option specifies remain in current MPL set and the access state control for entering wait option specifies do not modify access state, the machine will check the wait time requested. If the wait time requested is less than an implementation-defined limit (which will not exceed 2 seconds), the thread will remain in the current MPL. If the wait time requested is greater than this limit, the MPL control during wait option is ignored and the thread is automatically removed from the MPL at the beginning of the wait. The automatic removal does not change or affect the total wait time specified for the thread in the wait time interval.

The asynchronous signals processing option controls the action to be taken if an asynchronous signal is pending or received while in wait. If an asynchronous signal that is not blocked or ignored is generated for the thread and the asynchronous signals processing option indicates allow asynchronous signals processing during wait, the wait will be terminated and an asynchronous signal terminated MI wait  (hex 4C01) exception is signaled. Otherwise, when the asynchronous signals processing option indicates do not allow asynchronous signals processing during wait, the thread remains in the wait for the amount of time specified by the wait time interval.

While the thread is in wait state it may be interrupted for events unless the thread is masked.

A template value invalid  (hex 3801) exception is signalled if any of the reserved fields are not all binary zeroes.

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

10 Damage Encountered

20 Machine Support

22 Object Access

24 Pointer Specification

2E Resource Control Limit

32 Scalar Specification

36 Space Management

38 Template Specification

44 Protection Violation

4C Signals Management