diff --git a/include/unistd.h b/include/unistd.h index 37c2a54..4782b53 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -7,6 +7,7 @@ #define STDERR_FILENO 2 int syscall(int number, ...); +unsigned int sleep(unsigned int seconds); #endif /* __UNISTD_H__ */ diff --git a/lib/libc/SConscript b/lib/libc/SConscript index 473c13e..4d44201 100644 --- a/lib/libc/SConscript +++ b/lib/libc/SConscript @@ -13,11 +13,12 @@ src_common = [ "exit.c", "file.c", "malloc.c", + "printf.c", + "process.c", + "posix/mman.c", "string.c", "syscall.c", "time.c", - "printf.c", - "posix/mman.c", ] src_amd64 = [ diff --git a/lib/libc/process.c b/lib/libc/process.c new file mode 100644 index 0000000..67b1f14 --- /dev/null +++ b/lib/libc/process.c @@ -0,0 +1,15 @@ + +#include + +#include +#include + +unsigned int +sleep(unsigned int seconds) +{ + OSThreadSleep(seconds); + + // Should return left over time if woke up early + return 0; +} +