clrex

Clear Exclusive (Thumb)

CLREX

Clears exclusive monitor (Thumb).

Details

Clear Exclusive: Clears the exclusive monitor, causing any subsequent STREX or STLEX instructions to fail. This instruction is used to release exclusive access to memory and is typically called after completion of a load-exclusive/store-exclusive sequence. The condition flags are not affected.

Pseudocode Operation

ExclusiveMonitors.Clear()

Example

CLREX

Encoding

Binary Layout
111100111011
1
1
1
1
10
0
0
1
1
1
1
0010
1111
 
Format Thumb System
Opcode 0xF3BF8F2F
Extension A32 (Atomic)

Operands

Reference (Arm AArch32 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0xF57FF01F CLREX{<c>}{<q>} A32 111101010111 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0001 | 1111
0xF3BF8F2F CLREX{<c>}{<q>} T32 111100111011 | 1 | 1 | 1 | 1 | 10 | 0 | 0 | 1 | 1 | 1 | 1 | 0010 | 1111

Description

Clear-Exclusive clears the local monitor of the executing PE.

Operation

if ConditionPassed() then
    EncodingSpecificOperations();
    ClearExclusiveLocal(ProcessorID());