mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-16 16:14:25 -04:00
kern: update KHardwareTimer, move out of KCoreLocalRegion
This commit is contained in:
parent
5cb237d030
commit
bee629b8ad
5 changed files with 27 additions and 47 deletions
|
@ -74,6 +74,7 @@ namespace ams::kern {
|
|||
static KUnsafeMemory s_unsafe_memory;
|
||||
static KWorkerTaskManager s_worker_task_managers[KWorkerTaskManager::WorkerType_Count];
|
||||
static KInterruptManager s_interrupt_manager;
|
||||
static KHardwareTimer s_hardware_timers[cpu::NumCores];
|
||||
private:
|
||||
static ALWAYS_INLINE KCoreLocalContext &GetCoreLocalContext() {
|
||||
return reinterpret_cast<KCoreLocalRegion *>(cpu::GetCoreLocalRegionAddress())->current.context;
|
||||
|
@ -114,7 +115,11 @@ namespace ams::kern {
|
|||
}
|
||||
|
||||
static ALWAYS_INLINE KHardwareTimer &GetHardwareTimer() {
|
||||
return GetCoreLocalContext(GetCurrentCoreId()).hardware_timer;
|
||||
return s_hardware_timers[GetCurrentCoreId()];
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE KHardwareTimer &GetHardwareTimer(s32 core_id) {
|
||||
return s_hardware_timers[core_id];
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE KResourceLimit &GetSystemResourceLimit() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue