Files
FEX-Emu--FEX/Source/Tests/LinuxSyscalls/x64/Info.cpp
T
Scott Mansell 6ed36e3304 Refactor syscalls to take Frame
The vast majoirty of syscalls don't need anything in thread or frame.
So lets save an indirection for all those syscalls.

Most of the syscalls which do need Thread (or CTX via
Thread are in Thread.cpp or Memory.cpp
These have all been modifiy to fetch Thread from Frame
2021-03-09 20:28:50 +13:00

23 lines
669 B
C++

#include "Tests/LinuxSyscalls/Syscalls.h"
#include "Tests/LinuxSyscalls/x64/Syscalls.h"
#include <FEXCore/Core/Context.h>
#include <cstring>
#include <sys/utsname.h>
#include <sys/resource.h>
#include <sys/sysinfo.h>
namespace FEX::HLE::x64 {
void RegisterInfo() {
REGISTER_SYSCALL_IMPL_X64(sysinfo, [](FEXCore::Core::CpuStateFrame *Frame, struct sysinfo *info) -> uint64_t {
uint64_t Result = ::sysinfo(info);
SYSCALL_ERRNO();
});
REGISTER_SYSCALL_IMPL_X64(getrusage, [](FEXCore::Core::CpuStateFrame *Frame, int who, struct rusage *usage) -> uint64_t {
uint64_t Result = ::getrusage(who, usage);
SYSCALL_ERRNO();
});
}
}