cli_sti.asm.h
来自「linux下简单实现VOS游戏」· C头文件 代码 · 共 29 行
H
29 行
/* The 15-410 kernel project * * cli_sti.asm.h * * This file should be #included in all assembly language source * files that use the cli or sti instruction. This is so that * profiling the preemptiveness of the kernel is possible * even when interrupts are enabled or disabled within * functions written in assembly language. * */#ifndef _CLI_STI_ASM_H#define _CLI_STI_ASM_H#define cli cli;\ pushl %ebx;\ movl $0x3badd00d, %ebx;\ xchg %bx, %bx;\ popl %ebx#define sti pushl %ebx;\ movl $0x4badd00d, %ebx;\ xchg %bx, %bx;\ popl %ebx;\ sti#endif /* _CLI_STI_ASM_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?