Unlock Object (UNLOCK)
Instruction Syntax
Op Code (Hex) | Operand 1 |
---|---|
03F1 | Unlock template |
Bound Program Access |
---|
|
Description:
The instruction releases the object locks that are specified in the unlock template. The template specified by operand 1 identifies the system objects and the lock states (on those objects) that are to be released. The unlock template must be aligned on a 16-byte boundary. The format is as follows:
Offset | |||
---|---|---|---|
Dec | Hex | Field Name | Data Type and Length |
0 | 0 | Number of unlock requests in template | Bin(4) |
4 | 4 | Offset to lock state selection bytes | Bin(2) |
6 | 6 | Reserved | Char(8) + |
14 | E | Unlock options | Char(2) |
14 | E |
|
|
14 |
E |
|
|
14 | E |
|
|
14 |
E |
|
|
14 |
E |
|
|
14 | E |
|
|
14 |
E |
|
|
14 | E |
|
|
16 |
10 |
Object(s) to unlock |
[*] System pointer |
* |
* |
--- End --- |
|
The unlock options is located by adding the offset to lock state selection bytes above to operand 1.
Offset | |||
---|---|---|---|
Dec | Hex | Field Name | Data Type and Length |
0 |
0 |
Unlock options |
[*] Char(1) |
0 | 0 |
|
|
0 | 0 |
|
|
0 | 0 |
|
|
0 | 0 |
|
|
0 | 0 |
|
|
0 | 0 |
|
|
0 |
0 |
|
|
0 | 0 |
|
|
0 |
0 |
|
|
* |
* |
--- End --- |
|
The unlock type field specifies if locks are to be released or outstanding lock requests are to be canceled.
If all asynchronous lock waits are being canceled (unlock type specified as 10 ), then objects to unlock and unlock options for each object are not required. If the asynchronous lock fields are provided in the template, then the data is ignored.
Specifying 01 for unlock type attempts to cancel an asynchronous lock request that is identical to the one defined in the template. After the instruction attempts to cancel the specified request, program execution continues just as if 00 had been specified for unlock type. A waiting lock request is canceled if the number of active requests in the template, the objects, the objects corresponding lock states, and the order of the active entries in the template all match.
When a lock is released, the lock count is reduced by 1 or set to 0 in the specified state. This option is specified by the lock count option parameter.
If 01 is specified for unlock type and the lock count option for an object lock is 0 (lock count reduced by 1), then a successful cancel satisfies this request, and no additional locks on the object are unlocked. If the lock count option for an object lock is set to 1 (set lock count to 0), the results of the cancel are disregarded, and all held locks on the object are unlocked.
Specific locks can be unlocked only if they are allocated to the process, thread, or the transaction control structure attached to the thread issuing the unlock instruction. The lock scope specified by lock scope and lock scope object type must also match the scope of the locks currently allocated for the process, thread, or the transaction control structure. If lock scope object type has a value of transaction control structure attached to the current thread and a transaction control structure is not attached to the current thread, the lock must be allocated to the process containing the current thread.
Implicit locks may not be unlocked with this instruction. No locks are unlocked if an entry in the template is invalid.
Object locks to unlock are processed sequentially and individually.
The order of the unlock can be specified by the reverse unlock option field. A value of binary 0 is the default and indicates that unlocks will be performed in template order. A value of binary 1 indicates that the unlocks will be performed in reverse template order.
If one specific object lock cannot be unlocked because the process, thread, or the transaction control structure does not hold the indicated lock on the object, then exception data is saved, but processing of the instruction continues.
After all requested object locks have been processed, the invalid unlock request (hex 1A03) exception is signaled if any object lock was not unlocked.
If 01 is specified for unlock type and the cancel attempt is unsuccessful, an invalid unlock request (hex 1A03) exception is signaled when any object lock in the template is not unlocked.
Authorization Required
- Execute
- Contexts referenced for address resolution
Lock Enforcement
- Materialize
- Contexts referenced for address resolution
Exceptions
- 06 Addressing
- 0601 Space Addressing Violation
- 0602 Boundary Alignment
- 0603 Range
- 08 Argument/Parameter
- 0801 Parameter Reference Violation
- 0A Authorization
- 0A01 Unauthorized for Operation
- 10 Damage Encountered
- 1004 System Object Damage State
- 1005 Authority Verification Terminated Due to Damaged Object
- 1044 Partial System Object Damage
- 1A Lock State
- 1A01 Invalid Lock State
- 1A03 Invalid Unlock Request
- 1C Machine-Dependent
- 1C03 Machine Storage Limit Exceeded
- 20 Machine Support
- 2002 Machine Check
- 2003 Function Check
- 22 Object Access
- 2201 Object Not Found
- 2202 Object Destroyed
- 2203 Object Suspended
- 2205 Object Not Available to Process
- 2207 Authority Verification Terminated Due to Destroyed Object
- 2208 Object Compressed
- 220B Object Not Available
- 24 Pointer Specification
- 2401 Pointer Does Not Exist
- 2402 Pointer Type Invalid
- 2E Resource Control Limit
- 2E01 User Profile Storage Limit Exceeded
- 36 Space Management
- 3601 Space Extension/Truncation
- 38 Template Specification
- 3801 Template Value Invalid
- 44 Protection Violation
- 4401 Object Domain or Hardware Storage Protection Violation