From da1171983bcafe24625ad4a1c5cae600e0dcf01e Mon Sep 17 00:00:00 2001 From: Tom-on64 Date: Sun, 25 Aug 2024 15:39:46 +0200 Subject: [PATCH] Fixed sleep() function being weird --- include/c/time.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/c/time.h b/include/c/time.h index 8d8fa83..7842c93 100644 --- a/include/c/time.h +++ b/include/c/time.h @@ -1,11 +1,11 @@ #ifndef TIME_H #define TIME_H +#include #include void sleep(uint32_t ms) { - // Call syscall 0 (eax) with 'ms' miliseconds (ebx) - __asm__ volatile ("int $0x80" : : "a"(0), "b"(ms)); + syscall(SYS_SLEEP, ms, 0, 0); } #endif