From 8f09099757467457f95c118c1de14ca70c7feab0 Mon Sep 17 00:00:00 2001 From: Graham Sanderson Date: Mon, 20 Jun 2022 09:52:43 -0500 Subject: [PATCH] sem_acquire has no reason to do a notify! (#857) --- src/common/pico_sync/sem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/pico_sync/sem.c b/src/common/pico_sync/sem.c index 5578a49..ec49fdb 100644 --- a/src/common/pico_sync/sem.c +++ b/src/common/pico_sync/sem.c @@ -23,7 +23,7 @@ void __time_critical_func(sem_acquire_blocking)(semaphore_t *sem) { uint32_t save = spin_lock_blocking(sem->core.spin_lock); if (sem->permits > 0) { sem->permits--; - lock_internal_spin_unlock_with_notify(&sem->core, save); + spin_unlock(sem->core.spin_lock, save); break; } lock_internal_spin_unlock_with_wait(&sem->core, save); @@ -43,7 +43,7 @@ bool __time_critical_func(sem_acquire_block_until)(semaphore_t *sem, absolute_ti uint32_t save = spin_lock_blocking(sem->core.spin_lock); if (sem->permits > 0) { sem->permits--; - lock_internal_spin_unlock_with_notify(&sem->core, save); + spin_unlock(sem->core.spin_lock, save); return true; } if (lock_internal_spin_unlock_with_best_effort_wait_or_timeout(&sem->core, save, until)) { @@ -56,7 +56,7 @@ bool __time_critical_func(sem_try_acquire)(semaphore_t *sem) { uint32_t save = spin_lock_blocking(sem->core.spin_lock); if (sem->permits > 0) { sem->permits--; - lock_internal_spin_unlock_with_notify(&sem->core, save); + spin_unlock(sem->core.spin_lock, save); return true; } spin_unlock(sem->core.spin_lock, save);