Section: Linux Kernel Functions (9)
save_flags, restore_flags - save/restore processor state and irq mask
unsigned long flags;
macros cooperate with the
function to provide interrupt protection to critical sections of
function saves the current processor state, most specifically the
interrupt priority level, in the
value (which must be an l-value). The flags must be passed to a
subsequent call to
to restore the processor state.
macro does not affect the processor state, but drivers may use the
functions to disable and enable interrupts after saving the current
flags. When the critical section of code is passed, the
returns the processor to its state at the point where the matching
Only values returned by
can be passed to
Any other values may cause unpredictable results, and are
certainly not portable.
macro saves the processor state in the
parameter, which must be a non-const l-value.
Stephen Williams (email@example.com
How does all this react with symmetric multiprocessor machines?