Materialize Selected Locks (MATSELLK)


Op Code (Hex) Operand 1 Operand 2

033E Receiver Object or space location

Operand 1: Space pointer.

Operand 2: System pointer or space pointer data object.

Bound program access

Built-in number for MATSELLK is 53. MATSELLK ( receiver : address object_or_object_location_space_location : address of system pointer OR address of space pointer(16) )

Description

The locks for the object or space location referenced by operand 2 are materialized. The locks materialized are the thread scoped locks held by the current thread and the process scoped locks held by the process containing the current thread. The format of the materialization template is as follows:

Offset
Dec Hex
Field Name
Data Type and Length
0 0
Materialization size specification
Char(8)
0 0
Number of bytes provided for materialization
Bin(4)
4 4
Number of bytes available for materialization
Bin(4)
8 8
Cumulative lock status for all locks on operand 2
Char(1)
8 8
Lock state
Char(1)
8 8
LSRD
Bit 0
8 8
LSRO
Bit 1
8 8
LSUP
Bit 2
8 8
LEAR
Bit 3
8 8
LENR
Bit 4
8 8
Reserved (binary 0)
Bits 5-7
9 9
Reserved
Char(3)
12 C
Number of lock entries
Bin(2)
14 E
Return Format
Char(1)
14 E
Reserved (Binary 0)
Bits 0-3
14 E
Use expanded results
Bit 4
14 E
Do not return locks held by a transaction
Bit 5
14 E
Do not return locks held by a process
Bit 6
14 E
Do not return locks held or waited on by a thread
Bit 7
15 F
Reserved
Char(1)
16 10
Lock status
[*] Char(32)



(repeated number of lock entries times) (If the use expanded results flag is binary 1 in the return format field then the size of each lock status entry is 32 bytes, otherwise the lock status entry is 2 bytes.


16 10
Lock state
Char(1)



Hex 80 = LSRD lock request
Hex 40 = LSRO lock request
Hex 20 = LSUP lock request
Hex 10 = LEAR lock request
Hex 08 = LENR lock request

All other values are reserved



17 11
Status of lock
Char(1)
17 11
Lock held by a transaction control structure
Bit 0
17 11
Lock scope
Bit 1



0 = Lock is held by the process containing the current thread
1 = Lock is held by the current thread


17 11
Reserved (binary 0)
Bits 2-5
17 11
Implicit lock
Bit 6



0 = Not implicit lock
1 = Is implicit lock


17 11
Reserved (binary 1)
Bit 7



(The following fields are only returned if the return format field specifies use expanded results.)


18 12
Reserved (binary 0)
Char(14)
32 20
Suspend pointer
Suspend Pointer
* *
--- End ---

The first 4 bytes of the materialization identifies the total number of bytes provided for use by the instruction. This value is supplied as input to the instruction and is not modified by the instruction. A value of less than 8 causes the materialization length invalid  (hex 3803) exception to be signaled.

The second 4 bytes of the materialization identifies the total number of bytes available to be materialized. The instruction materializes as many bytes as can be contained in the area specified as the receiver. If the byte area identified by the receiver is greater than that required to contain the information requested, then the excess bytes are unchanged. No exceptions are signaled in the event that the receiver contains insufficient area for the materialization, other than the materialization length invalid  (hex 3803) exception described previously.

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

The maximum number of locks that can be materialized with this instruction is 32,767. No exception will be signaled if more than 32,767 exist and only the first 32,767 locks found will be materialized.

Authorization

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

28 Process/Thread State

2E Resource Control Limit

32 Scalar Specification

36 Space Management

38 Template Specification

44 Protection Violation