mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 13:00:41 +02:00
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
20 lines
541 B
C++
20 lines
541 B
C++
#include "Tests/LinuxSyscalls/Syscalls.h"
|
|
#include "Tests/LinuxSyscalls/x64/Syscalls.h"
|
|
#include <FEXCore/Core/Context.h>
|
|
|
|
#include <stdint.h>
|
|
#include <sched.h>
|
|
#include <sys/time.h>
|
|
#include <sys/resource.h>
|
|
#include <sys/syscall.h>
|
|
#include <unistd.h>
|
|
|
|
namespace FEX::HLE::x64 {
|
|
void RegisterSched() {
|
|
REGISTER_SYSCALL_IMPL_X64(sched_rr_get_interval, [](FEXCore::Core::CpuStateFrame *Frame, pid_t pid, struct timespec *tp) -> uint64_t {
|
|
uint64_t Result = ::sched_rr_get_interval(pid, tp);
|
|
SYSCALL_ERRNO();
|
|
});
|
|
}
|
|
}
|