Luna/libs/libc/src/luna.cpp
apio 8398b2e2e4 libc: Change bits/macros.h to use a __lc_ prefix for internal macros
That way, we don't pollute user programs with our own 'noreturn' and 'deprecated' macros
2022-10-15 09:52:37 +02:00

25 lines
430 B
C++

#include <luna.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>
extern "C"
{
pid_t gettid()
{
return syscall(SYS_gettid);
}
unsigned int msleep(unsigned int ms)
{
return (unsigned int)syscall(SYS_sleep, ms);
}
__lc_noreturn void __luna_abort(const char* message)
{
fputs(message, stderr);
abort();
}
}