2022-10-02 18:10:53 +02:00
|
|
|
#include <luna.h>
|
2022-10-11 21:12:19 +02:00
|
|
|
#include <stdio.h>
|
2022-10-08 12:06:09 +02:00
|
|
|
#include <stdlib.h>
|
2022-10-02 18:10:53 +02:00
|
|
|
#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)
|
|
|
|
{
|
2022-10-07 18:19:06 +02:00
|
|
|
return (unsigned int)syscall(SYS_sleep, ms);
|
2022-10-02 18:10:53 +02:00
|
|
|
}
|
|
|
|
|
2022-10-15 09:52:37 +02:00
|
|
|
__lc_noreturn void __luna_abort(const char* message)
|
2022-10-02 18:10:53 +02:00
|
|
|
{
|
2022-10-12 11:54:29 +02:00
|
|
|
fputs(message, stderr);
|
2022-10-08 12:06:09 +02:00
|
|
|
abort();
|
2022-10-02 18:10:53 +02:00
|
|
|
}
|
|
|
|
}
|