Unlock Space Location (UNLOCKSL)

Instruction Syntax

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
    (1 = lock requested, 0 = lock not requested) Only one state may be requested per entry.

  • Bits 0-4

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

    0 =
    Lock is scoped to the current thread
    1 =
    Lock is scoped to the lock scope object type

  • Bit 0

15

F

  • Lock scope object type

    0 =
    Process containing the current thread
    1 =
    Transaction control structure attached to the current thread.

  • Bit 1

15 F
  • Reserved (binary 0)
  • Bits 2-7
16 10 Reserved (binary 0) Char(16)

32

20

Space location(s) to be unlocked
(repeated as specified by number of space location unlock requests in template above)

[*] Space pointer

*

*

--- 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
(repeated for each unlock request)

[*] Char(1)

0

0

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

  • Bits 0-4

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

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

  • Bit 5

0 0
  • Reserved (binary 0)
  • Bit 6

0

0

  • Entry active indicator

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

  • Bit 7

*

*

--- 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:

  • When lock scope has a value of lock is scoped to the current thread, the lock scope will be to the current thread.
  • When lock scope has a value of lock is scoped to the lock scope object type and lock scope object type has a value of process containing the current thread, the lock scope will be the process containing the current thread.
  • When lock scope has a value of lock is scoped to the lock scope object type and lock scope object type has a value of transaction control structure attached to the current thread, the lock scope will be the transaction control structure that is attached to the current thread. If the current thread does not have a transaction control structure attached, then the lock scope will be the process containing the current thread.

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

  • None

Lock Enforcement

  • None

Exceptions

  • 06 Addressing
    • 0601 Space Addressing Violation
    • 0602 Boundary Alignment
    • 0603 Range
  • 08 Argument/Parameter
    • 0801 Parameter Reference Violation
  • 10 Damage Encountered
    • 1004 System Object Damage State
    • 1044 Partial System Object Damage
  • 1A Lock State
    • 1A03 Invalid Unlock Request
    • 1A05 Invalid Space Location Unlocked
  • 1C Machine-Dependent
    • 1C03 Machine Storage Limit Exceeded
    • 1C06 Machine Lock Limit Exceeded
  • 20 Machine Support
    • 2002 Machine Check
    • 2003 Function Check
  • 22 Object Access
    • 2202 Object Destroyed
    • 2204 Object Not Eligible for Operation
    • 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
  • 32 Scalar Specification
    • 3201 Scalar Type Invalid
    • 3203 Scalar Value Invalid
  • 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