mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Let's have cli() and sti() clobber memory.
I don't like the idea of the compiler reordering anything around either cli() or sti(), so let's make sure it doesn't.
This commit is contained in:
parent
e2f27aa7b5
commit
c63d476da2
Notes:
sideshowbarker
2024-07-19 15:53:35 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c63d476da2e
1 changed files with 2 additions and 2 deletions
|
@ -79,8 +79,8 @@ void write_gdt_entry(word selector, Descriptor&);
|
|||
#define LSB(x) ((x) & 0xFF)
|
||||
#define MSB(x) (((x)>>8) & 0xFF)
|
||||
|
||||
#define cli() asm volatile("cli")
|
||||
#define sti() asm volatile("sti")
|
||||
#define cli() asm volatile("cli" ::: "memory")
|
||||
#define sti() asm volatile("sti" ::: "memory")
|
||||
#define memory_barrier() asm volatile ("" ::: "memory")
|
||||
|
||||
inline dword cpu_cr3()
|
||||
|
|
Loading…
Reference in a new issue