NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO
#include <sync/chSpinLock.h>int svMaskAll(void);
The svMaskAll function disables interrupts on the current processor by setting the processor interrupt mask to its maximum value. There is no effect on other processors. It returns the previous interrupt mask.
The svUnmaskAll function enables interrupts on the current processor by setting the processor interrupt mask to its minimum value. There is no effect on other processors.
The svUnmask function resets the interrupt mask to a state represented by oldval. The oldval value must have been returned by a previous invocation of svMaskAll. Pairs of svMaskAll and svUnmask may be nested. The interrupt mask is part of a thread's execution context, it is saved as part of the thread's status when the thread is suspended. If a thread performs a blocking call after calling svMaskAll, interrupt processing may be enabled by another scheduled thread. It will be disabled again when the thread is restarted. Such situations should be avoided.
The svMaskAll, svUnmaskAll and svUnmask functions only relate to the interrupt mask from processor standpoint. If the machine is equipped with an external interrupt controller, these calls have no effect on the controller status.
These calls are restricted to SUPERVISOR threads. Their use must be limited to a very small number of instructions. They should not be used to ensure mutual exclusion. The routines svMaskedLockGet and svMaskedLockRel should be used for this purpose.
svMaskAll returns the current interrupt masking status.
No error messages are returned .
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO