diff options
author | Ian Moffett <ian@osmora.org> | 2025-04-17 02:55:48 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-04-17 02:57:53 -0400 |
commit | 3d51f8229826e6aa617537784881ff1f85be884e (patch) | |
tree | 9d482de1aabc9c21902ecf0ebaa3a059a673cf5a /sys/include/arch | |
parent | 5f13039023890e9c634912704464601f199c672d (diff) |
kernel/amd64: cdefs: Add more md_* macros
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/arch')
-rw-r--r-- | sys/include/arch/amd64/cdefs.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/include/arch/amd64/cdefs.h b/sys/include/arch/amd64/cdefs.h index 29a8841..256fd8b 100644 --- a/sys/include/arch/amd64/cdefs.h +++ b/sys/include/arch/amd64/cdefs.h @@ -33,6 +33,13 @@ #include <sys/cdefs.h> #include <machine/sync.h> -#define md_pause() __ASMV("rep; nop") +/* + * Please use CLI wisely, it is a good idea to use + * md_sync_all() after using STI to ensure stable + * system operation. + */ +#define md_pause() __ASMV("rep; nop") /* (F3 90) PAUSE */ +#define md_intoff() __ASMV("cli") /* Clear interrupts */ +#define md_inton() __ASMV("sti") /* Enable interrupts */ #endif /* !_AMD64_CDEFS_H_ */ |