rpcsx/orbis-kernel/src/sys/sys_event.cpp

27 lines
787 B
C++
Raw Normal View History

2023-07-03 13:10:16 +02:00
#include "sys/sysproto.hpp"
2023-07-12 03:20:28 +02:00
#include "thread/Process.hpp"
#include "utils/Logs.hpp"
struct KQueue : orbis::File {};
2023-07-12 03:20:28 +02:00
orbis::SysResult orbis::sys_kqueue(Thread *thread) {
ORBIS_LOG_TODO(__FUNCTION__);
auto queue = knew<KQueue>();
if (queue == nullptr) {
return ErrorCode::NOMEM;
}
thread->retval[0] = thread->tproc->fileDescriptors.insert(queue);
return {};
}
2023-07-03 13:10:16 +02:00
2023-07-06 18:16:25 +02:00
orbis::SysResult orbis::sys_kevent(Thread *thread, sint fd,
2023-07-12 03:20:28 +02:00
ptr<KEvent> changelist, sint nchanges,
ptr<KEvent> eventlist, sint nevents,
ptr<const timespec> timeout) {
2023-10-30 20:01:36 +01:00
// ORBIS_LOG_TODO(__FUNCTION__, fd, changelist, nchanges, eventlist, nevents, timeout);
thread->retval[0] = nevents;
2023-07-03 13:10:16 +02:00
return {};
}