diff options
Diffstat (limited to 'src/drivers/cpu.c')
-rw-r--r-- | src/drivers/cpu.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/drivers/cpu.c b/src/drivers/cpu.c index ba8c66f..5c27c51 100644 --- a/src/drivers/cpu.c +++ b/src/drivers/cpu.c @@ -46,3 +46,24 @@ void outl(u16 port, u32 data) { __asm__ volatile("outl %0, %1" ::"a"(data), "Nd"(port)); } + +void cli() +{ + __asm__ volatile("cli"); +} + +void sti() +{ + __asm__ volatile("sti"); +} + +void hlt() +{ + __asm__ volatile("hlt"); +} + +void idle() +{ + while (1) + hlt(); +} |