#include "sys/sysproto.hpp" #include "utils/Logs.hpp" orbis::SysResult orbis::sys_sigaction(Thread *thread, sint sig, ptr act, ptr oact) { return {}; } orbis::SysResult orbis::sys_sigprocmask(Thread *thread, sint how, ptr set, ptr oset) { if (oset) { for (std::size_t i = 0; i < 2; ++i) { oset[i] = thread->sigMask[i]; } } if (set) { switch (how) { case 0: // unblock for (std::size_t i = 0; i < 2; ++i) { thread->sigMask[i] &= ~set[i]; } case 1: // block for (std::size_t i = 0; i < 2; ++i) { thread->sigMask[i] |= set[i]; } break; case 3: // set for (std::size_t i = 0; i < 2; ++i) { thread->sigMask[i] = set[i]; } break; default: ORBIS_LOG_ERROR("sys_sigprocmask: unimplemented how", how); thread->where(); return {}; } } return {}; } orbis::SysResult orbis::sys_sigwait(Thread *thread, ptr set, ptr sig) { return ErrorCode::NOSYS; } orbis::SysResult orbis::sys_sigtimedwait(Thread *thread, ptr set, ptr info, ptr timeout) { return ErrorCode::NOSYS; } orbis::SysResult orbis::sys_sigwaitinfo(Thread *thread, ptr set, ptr info) { return ErrorCode::NOSYS; } orbis::SysResult orbis::sys_sigpending(Thread *thread, ptr set) { return ErrorCode::NOSYS; } orbis::SysResult orbis::sys_sigsuspend(Thread *thread, ptr set) { return ErrorCode::NOSYS; } orbis::SysResult orbis::sys_sigaltstack(Thread *thread, ptr ss, ptr oss) { return ErrorCode::NOSYS; } orbis::SysResult orbis::sys_kill(Thread *thread, sint pid, sint signum) { return ErrorCode::NOSYS; } orbis::SysResult orbis::sys_pdkill(Thread *thread, sint fd, sint signum) { return ErrorCode::NOSYS; } orbis::SysResult orbis::sys_sigqueue(Thread *thread, pid_t pid, sint signum, ptr value) { return ErrorCode::NOSYS; } orbis::SysResult orbis::sys_sigreturn(Thread *thread, ptr sigcntxp) { return ErrorCode::NOSYS; } orbis::SysResult orbis::nosys(Thread *thread) { return ErrorCode::NOSYS; }