rpcsx/orbis-kernel/src/sys/sys_pipe.cpp
DH e90566e7de [rpcsx-os/orbis-kernel] random fixes
fix pipe
fix socketpair
fix bridge
fix evf_wait with timeout
fix umtx_op(0x17)
implement ipmi evf
stub sched_get_priority_max/min
stub sys_rtprio_thread
implement sys_yield
emit event on signal
stub ajm register/unregister ioctls
stub av_control ioctl
hack removal
2024-01-04 03:53:58 +03:00

14 lines
378 B
C++

#include "sys/sysproto.hpp"
#include "utils/Logs.hpp"
#include <pipe.hpp>
orbis::SysResult orbis::sys_pipe(Thread *thread) {
auto [a, b] = createPipe();
auto fd0 = thread->tproc->fileDescriptors.insert(a);
auto fd1 = thread->tproc->fileDescriptors.insert(b);
ORBIS_LOG_ERROR(__FUNCTION__, fd0, fd1);
thread->retval[0] = fd0;
thread->retval[1] = fd1;
return {};
}