mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
Major interrupt change
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#include <syscalls/syscalls.h>
|
||||
#include <interrupt/isr.h>
|
||||
#include <memory/addresses.h>
|
||||
#include <stdint.h>
|
||||
|
||||
int sys_sleep(intFrame_t* iframe) {
|
||||
uint32_t* sleepTimerTicks = (uint32_t*)SLEEP_TIMER;
|
||||
*sleepTimerTicks = iframe->ebx;
|
||||
|
||||
while (*sleepTimerTicks > 0) { __asm__ volatile ("sti; hlt"); }
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user