arLock Function
Declaration
BOOL arLock(void);
Return Value

Returns TRUE if interrupts were enabled prior to the function call, or FALSE if they were already disabled.

Description

The arLock function disables global interrupts (thereby preventing task preemption) and retrieves the previous state of the interrupt enable flag. This returned status must be preserved and later passed to the arRestore function to correctly revert the interrupt state. This mechanism supports nested critical sections, allowing pairs of arLock and arRestore calls to be safely nested without prematurely re-enabling interrupts.

Version:1.0
Header file:AR_API.h
See also: arRestore, BOOL, context switching, FALSE, TRUE
SpaceShadow documentation