26 lines
481 B
C++
26 lines
481 B
C++
|
#include <luna.h>
|
||
|
#include <string.h>
|
||
|
#include <sys/syscall.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
#define noreturn __attribute__((noreturn))
|
||
|
|
||
|
extern "C"
|
||
|
{
|
||
|
pid_t gettid()
|
||
|
{
|
||
|
return syscall(SYS_gettid);
|
||
|
}
|
||
|
|
||
|
unsigned int msleep(unsigned int ms)
|
||
|
{
|
||
|
return syscall(SYS_sleep, ms);
|
||
|
}
|
||
|
|
||
|
noreturn void __luna_abort(const char* message)
|
||
|
{
|
||
|
syscall(SYS_write, message, strlen(message));
|
||
|
syscall(SYS_exit);
|
||
|
__builtin_unreachable();
|
||
|
}
|
||
|
}
|