Unlock Teraspace Storage Location (UNLCKTSL)


Bound program access

Built-in number for UNLCKTSL is 622. UNLCKTSL ( unlock_request_template : address of space pointer(16) )

Description

The locks specified in the unlock template (operand 1) are unlocked. UNLCKTSL can unlock any location locked by the LOCKTSL or LOCKSL instruction. A maximum of 4093 locations can be unlocked with one UNLCKTSL instruction.

A space location specified within the template need not exist when this instruction is issued.

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

The lock request template identified by operand 1 must be aligned on a 16-byte boundary or an boundary alignment  (hex 0602) exception is signaled.

The format of operand 1 is as follows:

Offset
Dec Hex
Field Name
Data Type and Length
0 0
Number of unlock requests in template
UBin(4)
4 4
Offset to lock state selection values
UBin(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
Location(s) to be unlocked
[*] Space pointer



(repeated as specified by number of 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 ---

This instruction can request the deallocation of one or more lock states on one or more 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, a 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 Teraspace Storage 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 unlocks have been processed, an invalid unlock request  (hex 1A03) exception is signaled if any 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

36 Space Management

38 Template Specification

44 Protection Violation