Skip to content

Commit 8f09099

Browse files
authored
sem_acquire has no reason to do a notify! (raspberrypi#857)
1 parent 9644399 commit 8f09099

File tree

1 file changed

+3
-3
lines changed
  • src/common/pico_sync

1 file changed

+3
-3
lines changed

src/common/pico_sync/sem.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void __time_critical_func(sem_acquire_blocking)(semaphore_t *sem) {
2323
uint32_t save = spin_lock_blocking(sem->core.spin_lock);
2424
if (sem->permits > 0) {
2525
sem->permits--;
26-
lock_internal_spin_unlock_with_notify(&sem->core, save);
26+
spin_unlock(sem->core.spin_lock, save);
2727
break;
2828
}
2929
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
4343
uint32_t save = spin_lock_blocking(sem->core.spin_lock);
4444
if (sem->permits > 0) {
4545
sem->permits--;
46-
lock_internal_spin_unlock_with_notify(&sem->core, save);
46+
spin_unlock(sem->core.spin_lock, save);
4747
return true;
4848
}
4949
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) {
5656
uint32_t save = spin_lock_blocking(sem->core.spin_lock);
5757
if (sem->permits > 0) {
5858
sem->permits--;
59-
lock_internal_spin_unlock_with_notify(&sem->core, save);
59+
spin_unlock(sem->core.spin_lock, save);
6060
return true;
6161
}
6262
spin_unlock(sem->core.spin_lock, save);

0 commit comments

Comments
 (0)