mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-20 04:03:57 +00:00
refactor(windows-emulator/syscalls): partial refactor of syscalls.cpp, splits syscall implementations over multiple files
This commit is contained in:
33
src/windows-emulator/syscalls/timer.cpp
Normal file
33
src/windows-emulator/syscalls/timer.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "../std_include.hpp"
|
||||
#include "../syscall_dispatcher.hpp"
|
||||
#include "../emulator_utils.hpp"
|
||||
#include "../syscall_utils.hpp"
|
||||
|
||||
namespace syscalls
|
||||
{
|
||||
NTSTATUS handle_NtQueryTimerResolution(const syscall_context&, const emulator_object<ULONG> maximum_time,
|
||||
const emulator_object<ULONG> minimum_time,
|
||||
const emulator_object<ULONG> current_time)
|
||||
{
|
||||
maximum_time.write_if_valid(0x0002625a);
|
||||
minimum_time.write_if_valid(0x00001388);
|
||||
current_time.write_if_valid(0x00002710);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS handle_NtSetTimerResolution(const syscall_context&, const ULONG /*desired_resolution*/,
|
||||
const BOOLEAN set_resolution, const emulator_object<ULONG> current_resolution)
|
||||
{
|
||||
if (current_resolution)
|
||||
{
|
||||
current_resolution.write(0x0002625a);
|
||||
}
|
||||
|
||||
if (set_resolution)
|
||||
{
|
||||
return STATUS_TIMER_RESOLUTION_NOT_SET;
|
||||
}
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user