VERY experimental Nintendo Switch 2 emulator
C++
kernel: document previous location of interrupt disables in arbiter/condvar
Liamdd0f9ff95043
diff --git a/src/core/hle/kernel/k_address_arbiter.cpp b/src/core/hle/kernel/k_address_arbiter.cppindex a442a3b985..fb86451ea5 100644--- a/src/core/hle/kernel/k_address_arbiter.cpp+++ b/src/core/hle/kernel/k_address_arbiter.cpp@@ -29,7 +29,9 @@ bool DecrementIfLessThan(Core::System& system, s32* out, VAddr address, s32 valuauto& monitor = system.Monitor();const auto current_core = system.Kernel().CurrentPhysicalCoreIndex();- // TODO(bunnei): We should disable interrupts here via KScopedInterruptDisable.+ // NOTE: If scheduler lock is not held here, interrupt disable is required.+ // KScopedInterruptDisable di;+// TODO(bunnei): We should call CanAccessAtomic(..) here.// Load the value from the address.@@ -59,7 +61,9 @@ bool UpdateIfEqual(Core::System& system, s32* out, VAddr address, s32 value, s32auto& monitor = system.Monitor();const auto current_core = system.Kernel().CurrentPhysicalCoreIndex();- // TODO(bunnei): We should disable interrupts here via KScopedInterruptDisable.+ // NOTE: If scheduler lock is not held here, interrupt disable is required.+ // KScopedInterruptDisable di;+// TODO(bunnei): We should call CanAccessAtomic(..) here.// Load the value from the address.diff --git a/src/core/hle/kernel/k_condition_variable.cpp b/src/core/hle/kernel/k_condition_variable.cppindex 3f0be1c3fa..50a805296c 100644--- a/src/core/hle/kernel/k_condition_variable.cpp+++ b/src/core/hle/kernel/k_condition_variable.cpp@@ -198,7 +198,9 @@ void KConditionVariable::SignalImpl(KThread* thread) {u32 prev_tag{};bool can_access{};{- // TODO(bunnei): We should disable interrupts here via KScopedInterruptDisable.+ // NOTE: If scheduler lock is not held here, interrupt disable is required.+ // KScopedInterruptDisable di;+// TODO(bunnei): We should call CanAccessAtomic(..) here.can_access = true;if (can_access) [[likely]] {