Files
KirkOS/user/include/mlibc/sysdeps/astral/generic/astral.cpp
T
kaguya 9a9b91c940 user: implement mlibc as the libc, finally.
It's finally done..

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-05-02 03:31:49 -04:00

16 lines
283 B
C++

#include <astral/syscall.h>
#include <astral/archctl.h>
#include <errno.h>
#ifndef MLIBC_BUILDING_RTLD
int arch_ctl(int func, void *arg) {
long ret;
long error = syscall(SYSCALL_ARCHCTL, &ret, func, (uint64_t)arg);
if(error)
errno = error;
return error ? -1 : ret;
}
#endif