mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-17 19:10:07 +00:00
Merge pull request #712 from Sonicadvance1/fix_timers
Fixes timer syscall API
This commit is contained in:
commit
8ff0b870b1
@ -7,6 +7,7 @@
|
||||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
namespace FEX::HLE {
|
||||
@ -18,27 +19,27 @@ namespace FEX::HLE {
|
||||
});
|
||||
|
||||
REGISTER_SYSCALL_IMPL(timer_create, [](FEXCore::Core::InternalThreadState *Thread, clockid_t clockid, struct sigevent *sevp, timer_t *timerid) -> uint64_t {
|
||||
uint64_t Result = ::timer_create(clockid, sevp, timerid);
|
||||
uint64_t Result = ::syscall(SYS_timer_create, clockid, sevp, timerid);
|
||||
SYSCALL_ERRNO();
|
||||
});
|
||||
|
||||
REGISTER_SYSCALL_IMPL(timer_settime, [](FEXCore::Core::InternalThreadState *Thread, timer_t timerid, int flags, const struct itimerspec *new_value, struct itimerspec *old_value) -> uint64_t {
|
||||
uint64_t Result = ::timer_settime(timerid, flags, new_value, old_value);
|
||||
uint64_t Result = ::syscall(SYS_timer_settime, timerid, flags, new_value, old_value);
|
||||
SYSCALL_ERRNO();
|
||||
});
|
||||
|
||||
REGISTER_SYSCALL_IMPL(timer_gettime, [](FEXCore::Core::InternalThreadState *Thread, timer_t timerid, struct itimerspec *curr_value) -> uint64_t {
|
||||
uint64_t Result = ::timer_gettime(timerid, curr_value);
|
||||
uint64_t Result = ::syscall(SYS_timer_gettime, timerid, curr_value);
|
||||
SYSCALL_ERRNO();
|
||||
});
|
||||
|
||||
REGISTER_SYSCALL_IMPL(timer_getoverrun, [](FEXCore::Core::InternalThreadState *Thread, timer_t timerid) -> uint64_t {
|
||||
uint64_t Result = ::timer_getoverrun(timerid);
|
||||
uint64_t Result = ::syscall(SYS_timer_getoverrun, timerid);
|
||||
SYSCALL_ERRNO();
|
||||
});
|
||||
|
||||
REGISTER_SYSCALL_IMPL(timer_delete, [](FEXCore::Core::InternalThreadState *Thread, timer_t timerid) -> uint64_t {
|
||||
uint64_t Result = ::timer_delete(timerid);
|
||||
uint64_t Result = ::syscall(SYS_timer_delete, timerid);
|
||||
SYSCALL_ERRNO();
|
||||
});
|
||||
|
||||
|
@ -61,3 +61,6 @@ unlink_test
|
||||
mmap_test
|
||||
mremap_test
|
||||
semaphore_test
|
||||
splice_test
|
||||
sendfile_test
|
||||
timers_test
|
||||
|
Loading…
Reference in New Issue
Block a user