kern: remove unnecessary interrupt disables from arbiter/condvar

This commit is contained in:
Michael Scire authored and SciresM committed 2023-02-22 17:19:51 -08:00
1 parent 008eb974d4
commit 1279d236f3
2 files changed
+8 -3

No files matched your search

@@ -24,7 +24,9 @@ namespace ams::kern {
} }
ALWAYS_INLINE bool DecrementIfLessThan(s32 *out, KProcessAddress address, s32 value) { ALWAYS_INLINE bool DecrementIfLessThan(s32 *out, KProcessAddress address, s32 value) {
KScopedInterruptDisable di; /* NOTE: If scheduler lock is not held here, interrupt disable is required. */
/* KScopedInterruptDisable di; */
MESOSPHERE_ASSERT(KScheduler::IsSchedulerLockedByCurrentThread());
if (!cpu::CanAccessAtomic(address)) { if (!cpu::CanAccessAtomic(address)) {
return false; return false;
@@ -34,7 +36,9 @@ namespace ams::kern {
} }
ALWAYS_INLINE bool UpdateIfEqual(s32 *out, KProcessAddress address, s32 value, s32 new_value) { ALWAYS_INLINE bool UpdateIfEqual(s32 *out, KProcessAddress address, s32 value, s32 new_value) {
KScopedInterruptDisable di; /* NOTE: If scheduler lock is not held here, interrupt disable is required. */
/* KScopedInterruptDisable di; */
MESOSPHERE_ASSERT(KScheduler::IsSchedulerLockedByCurrentThread());
if (!cpu::CanAccessAtomic(address)) { if (!cpu::CanAccessAtomic(address)) {
return false; return false;
@@ -158,7 +158,8 @@ namespace ams::kern {
u32 prev_tag; u32 prev_tag;
bool can_access; bool can_access;
{ {
KScopedInterruptDisable di; /* NOTE: If scheduler lock is not held here, interrupt disable is required. */
/* KScopedInterruptDisable di; */
can_access = cpu::CanAccessAtomic(address); can_access = cpu::CanAccessAtomic(address);
if (AMS_LIKELY(can_access)) { if (AMS_LIKELY(can_access)) {