Skip to content

Commit

Permalink
Adapt code to make it work correclty in Sequoia.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Lvov committed Oct 1, 2024
1 parent bc32031 commit 06b9350
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CpuTscSync/CpuTscSync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,12 @@ void CpuTscSyncPlugin::processKernel(KernelPatcher &patcher)
{
if (!kernel_routed)
{
const auto* io_hib_system_has_slept = (getKernelVersion() >= KernelVersion::Sequoia) ? "__Z25IOHibernateSystemHasSleptv" : "_IOHibernateSystemHasSlept";
const auto* io_hib_system_wake = (getKernelVersion() >= KernelVersion::Sequoia) ? "__Z21IOHibernateSystemWakev" : "_IOHibernateSystemWake";

KernelPatcher::RouteRequest requests_for_long_jump[] {
{"_IOHibernateSystemHasSlept", IOHibernateSystemHasSlept, orgIOHibernateSystemHasSlept},
{"_IOHibernateSystemWake", IOHibernateSystemWake, orgIOHibernateSystemWake}
{io_hib_system_has_slept, IOHibernateSystemHasSlept, orgIOHibernateSystemHasSlept},
{io_hib_system_wake, IOHibernateSystemWake, orgIOHibernateSystemWake}
};

size_t size = arrsize(requests_for_long_jump) - (use_clock_get_calendar_to_sync ? 0 : 1);
Expand Down

0 comments on commit 06b9350

Please sign in to comment.