mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
Fixed sleep() function being weird
This commit is contained in:
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
#ifndef TIME_H
|
#ifndef TIME_H
|
||||||
#define TIME_H
|
#define TIME_H
|
||||||
|
|
||||||
|
#include <syscall.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
void sleep(uint32_t ms) {
|
void sleep(uint32_t ms) {
|
||||||
// Call syscall 0 (eax) with 'ms' miliseconds (ebx)
|
syscall(SYS_SLEEP, ms, 0, 0);
|
||||||
__asm__ volatile ("int $0x80" : : "a"(0), "b"(ms));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user