mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
15 lines
324 B
C
15 lines
324 B
C
#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;
|
|
}
|
|
|