Unlock Space Location (UNLOCKSL)


Op Code (Hex) Operand 1 Operand 2

03F2 Space location or unlock template Lock request

Operand 1: Space pointer data object.

Operand 2: Character(1) scalar or null.

Bound program access

Built-in number for UNLOCKSL is 56. UNLOCKSL ( space_location : address of space pointer(16) lock_request : address OR null operand )

Description

When operand 2 is not null, the lock type specified by operand 2 is removed from the space location (operand 1). When operand 2 is null, the lock type is removed for the space locations specified in the unlock template (operand 1). UNLOCKSL can unlock any space location locked by the LOCKTSL or LOCKSL instructions. A maximum of 4093 space locations can be unlocked with one UNLOCKSL instruction.

Any space location(s) specified by operand 1, or within the template specified by operand 1, need not exist when this instruction is issued although the space pointer must be a valid pointer as used to lock the space location.

A space pointer machine object cannot be specified for operand 1.

The following is the format of operand 2 when not null:

Offset
Dec Hex
Field Name
Data Type and Length
0 0
Lock request
Char(1)
0 0
Lock state selection
Bits 0-4



(1 = lock requested, 0 = lock not requested) Only one state may be requested per entry.


0 0
LSRD lock
Bit 0
0 0
LSRO lock
Bit 1
0 0
LSUP lock
Bit 2
0 0
LEAR lock
Bit 3
0 0
LENR lock
Bit 4
0 0
Reserved (binary 0)
Bits 5-7
1 1
--- End ---

If a space location lock cannot be unlocked because the thread does not hold the indicated lock, then the invalid space location unlocked  (hex 1A05) exception is signaled.

When operand 2 is null, the lock request template identified by operand 1 must be aligned on a 16-byte boundary. The format of operand 1 is as follows:

Offset
Dec Hex
Field Name
Data Type and Length
0 0
Number of space location unlock requests in template
Bin(4)
4 4
Offset to lock state selection values
Bin(2)
6 6 Reserved (binary 0) Char(9)
15 F Lock request options Char(1)
15 F Lock scope Bit 0
0 = Lock is scoped to the current thread
1 = Lock is scoped to the lock scope object type


15 F Lock scope object type Bit 1
0 = Process containing the current thread
1 = Transaction control structure attached to the current thread.


15 F Reserved (binary 0) Bits 2-7
16 10 Reserved (binary 0) Char(16)
32 20
Space location(s) to be unlocked
[*] Space pointer



(repeated as specified by number of space location unlock requests in template above)


* *
--- End ---

The unlock options is located by adding the offset to lock state selection values above to operand 1.

Offset
Dec Hex
Field Name
Data Type and Length
0 0
Unlock options
[*] Char(1)



(repeated for each unlock request)


0 0
Lock state to unlock
Bits 0-4



(1 = unlock requested, 0 = unlock not requested) Only one state may be requested.


0 0
LSRD lock
Bit 0
0 0
LSRO lock
Bit 1
0 0
LSUP lock
Bit 2
0 0
LEAR lock
Bit 3
0 0
LENR lock
Bit 4
0 0
Lock count option
Bit 5



0 = Lock count reduced by 1
1 = All locks are unlocked. (The lock count is set to 0).


0 0
Reserved (binary 0)
Bit 6
0 0
Entry active indicator
Bit 7



0 = Entry not active. This entry is not used.
1 = Entry active. Lock is to be unlocked.


* *
--- End ---

Note: Fields indicated with a plus sign (+) are ignored by the instruction.
This instruction can request the deallocation of one or more lock states on one or more space locations. The locks are deallocated sequentially until all specified locks are deallocated. When a lock is deallocated, the lock count is either reduced by 1 or set to 0 for the specified state. This option is specified by the lock count option.

The lock scope field and the lock scope object type field determine which scope all specified unlock requests will be allocated to, a thread, process or transaction control structure:

If lock scope object type has a value of transaction control structure attached to the current thread and the transaction control structure state does not allow objects to be locked on behalf of the transaction control structure, an object not eligible for operation  (hex 2204) exception is signaled.

Allocated process scoped locks and thread scoped locks, allocated by the initial thread of the process, are released when the process terminates. Allocated thread scoped locks are released when the thread terminates. If a thread requested a process scoped lock, the process will continue to hold that lock after termination of the requesting thread. If a thread requested a transaction control structure scoped lock, the transaction control structure will continue to hold that lock after the termination of the requesting thread.

Specific locks can be unlocked only if they are held by the thread issuing the Unlock Space Location instruction. If a space location lock cannot be unlocked because the thread does not hold the indicated lock, then exception data is saved but processing of the instruction continues. After all requested space location locks have been processed, the invalid unlock request  (hex 1A03) exception is signaled if any space location lock was not unlocked.

No locks are unlocked if a template value is invalid.

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

10 Damage Encountered

1A Lock State

1C Machine-Dependent

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