2022-10-02 16:10:53 +00:00
|
|
|
#include <luna.h>
|
2022-10-11 19:12:19 +00:00
|
|
|
#include <stdio.h>
|
2022-10-08 10:06:09 +00:00
|
|
|
#include <stdlib.h>
|
2022-10-02 16:10:53 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <sys/syscall.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
2022-10-18 15:36:33 +00:00
|
|
|
long getprocid(int field)
|
|
|
|
{
|
|
|
|
return syscall(SYS_getprocid, field);
|
|
|
|
}
|
|
|
|
|
2022-10-02 16:10:53 +00:00
|
|
|
unsigned int msleep(unsigned int ms)
|
|
|
|
{
|
2022-10-07 16:19:06 +00:00
|
|
|
return (unsigned int)syscall(SYS_sleep, ms);
|
2022-10-02 16:10:53 +00:00
|
|
|
}
|
|
|
|
|
2022-10-15 07:52:37 +00:00
|
|
|
__lc_noreturn void __luna_abort(const char* message)
|
2022-10-02 16:10:53 +00:00
|
|
|
{
|
2022-10-12 09:54:29 +00:00
|
|
|
fputs(message, stderr);
|
2022-10-08 10:06:09 +00:00
|
|
|
abort();
|
2022-10-02 16:10:53 +00:00
|
|
|
}
|
|
|
|
}
|