2023-07-03 13:10:16 +02:00
|
|
|
#include "sys/sysproto.hpp"
|
2023-10-31 19:32:43 +01:00
|
|
|
#include "utils/Logs.hpp"
|
|
|
|
|
#include <chrono>
|
|
|
|
|
#include <thread>
|
2023-07-03 13:10:16 +02:00
|
|
|
|
|
|
|
|
orbis::SysResult orbis::sys_exit(Thread *thread, sint status) {
|
|
|
|
|
if (auto exit = thread->tproc->ops->exit) {
|
|
|
|
|
return exit(thread, status);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ErrorCode::NOSYS;
|
|
|
|
|
}
|
2023-07-06 18:16:25 +02:00
|
|
|
orbis::SysResult orbis::sys_abort2(Thread *thread, ptr<const char> why,
|
|
|
|
|
sint narg, ptr<ptr<void>> args) {
|
|
|
|
|
return ErrorCode::NOSYS;
|
|
|
|
|
}
|
|
|
|
|
orbis::SysResult orbis::sys_wait4(Thread *thread, sint pid, ptr<sint> status,
|
|
|
|
|
sint options, ptr<struct rusage> rusage) {
|
2023-10-31 19:32:43 +01:00
|
|
|
// TODO
|
|
|
|
|
ORBIS_LOG_ERROR(__FUNCTION__, pid, status, options, rusage);
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::days(1));
|
|
|
|
|
return {};
|
2023-07-06 18:16:25 +02:00
|
|
|
}
|