Fixed sleep() function being weird

This commit is contained in:
2024-08-25 15:39:46 +02:00
parent 6d9b807fe6
commit da1171983b
+2 -2
View File
@@ -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