diff options
Diffstat (limited to 'sys/include/arch/amd64/cdefs.h')
-rw-r--r-- | sys/include/arch/amd64/cdefs.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/include/arch/amd64/cdefs.h b/sys/include/arch/amd64/cdefs.h index 98d3f0b..256fd8b 100644 --- a/sys/include/arch/amd64/cdefs.h +++ b/sys/include/arch/amd64/cdefs.h @@ -31,7 +31,15 @@ #define _AMD64_CDEFS_H_ #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_ */ |