diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
commit | fc22b3d6507c6745911b9dfcc68f1e665ae13dbc (patch) | |
tree | ce1e3bce06471410239a6f41282e328770aa404a /upstream/mageia-cauldron/man9/save_flags.9 | |
parent | Initial commit. (diff) | |
download | manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.tar.xz manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.zip |
Adding upstream version 4.22.0.upstream/4.22.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/mageia-cauldron/man9/save_flags.9')
-rw-r--r-- | upstream/mageia-cauldron/man9/save_flags.9 | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/upstream/mageia-cauldron/man9/save_flags.9 b/upstream/mageia-cauldron/man9/save_flags.9 new file mode 100644 index 00000000..da290dd7 --- /dev/null +++ b/upstream/mageia-cauldron/man9/save_flags.9 @@ -0,0 +1,63 @@ +.\" -*- nroff -*- +.TH save_flags 9 "$Date:$" "Linux DDI" "Linux Kernel Functions" +.SH NAME +save_flags, restore_flags \- save/restore processor state and irq mask +.SH SYNOPSIS +.B #include <asm/system.h> +.sp +.BI "unsigned long " flags ";" +.br +.BI "void save_flags(" flags ")" +.br +.BI "void restore_flags(" flags ")" +.SH DESCRIPTION +The +.B save_flags +and +.B restore_flags +macros cooperate with the +.B cli +function to provide interrupt protection to critical sections of +code. The +.B save_flags +function saves the current processor state, most specifically the +interrupt priority level, in the +.I flags +value (which must be an l-value). The flags must be passed to a +subsequent call to +.B restore_flags +to restore the processor state. +.PP +The +.B save_flags +macro does not affect the processor state, but drivers may use the +.BR cli (9) +and +.B sti +functions to disable and enable interrupts after saving the current +flags. When the critical section of code is passed, the +.B restore_flags +returns the processor to its state at the point where the matching +.B save_flags +was called. +.PP +Only values returned by +.B save_flags +can be passed to +.B restore_flags. +Any other values may cause unpredictable results, and are +certainly not portable. +.SH "RETURN VALUE" +The +.B restore_flags +macro saves the processor state in the +.I flags +parameter, which must be a non-const l-value. +.SH AVAILABILITY +Linux 1.0+ +.SH "SEE ALSO" +.BR "cli" (9) +.SH AUTHOR +Stephen Williams (steve@icarus.com) +.SH BUGS +How does all this react with symmetric multiprocessor machines? |