That function is meant more for user programs, and should still be rarely used, since it's not portable. Instead, we already know the number of arguments. We just call __lc_fast_syscallN, which also sets errno.
25 lines
479 B
C++
25 lines
479 B
C++
#include <luna.h>
|
|
#include <luna/syscall.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <sys/syscall.h>
|
|
|
|
extern "C"
|
|
{
|
|
long getprocid(int field)
|
|
{
|
|
return __lc_fast_syscall1(SYS_getprocid, field);
|
|
}
|
|
|
|
unsigned int msleep(unsigned int ms)
|
|
{
|
|
return (unsigned int)__lc_fast_syscall1(SYS_sleep, ms);
|
|
}
|
|
|
|
__lc_noreturn void __luna_abort(const char* message)
|
|
{
|
|
fputs(message, stderr);
|
|
abort();
|
|
}
|
|
} |