Files
FEX-Emu--FEX/Source/Tests/LinuxSyscalls/x64/Info.cpp
T
Ryan Houdek d3e98fedb4 Pulls uname nodename from host system
Hardcoding FEXCore as the nodename is an annoyance.
Pull the host's nodename instead.

Fixes #600
2021-02-22 22:39:05 -08:00

23 lines
683 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::InternalThreadState *Thread, struct sysinfo *info) -> uint64_t {
uint64_t Result = ::sysinfo(info);
SYSCALL_ERRNO();
});
REGISTER_SYSCALL_IMPL_X64(getrusage, [](FEXCore::Core::InternalThreadState *Thread, int who, struct rusage *usage) -> uint64_t {
uint64_t Result = ::getrusage(who, usage);
SYSCALL_ERRNO();
});
}
}