1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-18 16:32:05 +00:00

kern: remove unnecessary interrupt disables from arbiter/condvar

This commit is contained in:
Michael Scire 2023-02-21 10:58:02 -07:00
parent 819f7edc70
commit 4f6ecf138b
2 changed files with 8 additions and 3 deletions

View file

@ -24,7 +24,9 @@ namespace ams::kern {
}
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)) {
return false;
@ -34,7 +36,9 @@ namespace ams::kern {
}
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)) {
return false;

View file

@ -158,7 +158,8 @@ namespace ams::kern {
u32 prev_tag;
bool can_access;
{
KScopedInterruptDisable di;
/* NOTE: If scheduler lock is not held here, interrupt disable is required. */
/* KScopedInterruptDisable di; */
can_access = cpu::CanAccessAtomic(address);
if (AMS_LIKELY(can_access)) {