fix sem_acquire_block_until function name

This commit is contained in:
graham sanderson 2021-06-03 10:36:27 -05:00
parent c44e62defd
commit 45a1e08265
2 changed files with 4 additions and 4 deletions

View File

@ -120,7 +120,7 @@ bool sem_acquire_timeout_us(semaphore_t *sem, uint32_t timeout_us);
* \return true if permit was acquired, false if the until time was reached before
* acquiring.
*/
bool sem_acquire_until(semaphore_t *sem, absolute_time_t until);
bool sem_acquire_block_until(semaphore_t *sem, absolute_time_t until);
#ifdef __cplusplus
}

View File

@ -31,14 +31,14 @@ void __time_critical_func(sem_acquire_blocking)(semaphore_t *sem) {
}
bool __time_critical_func(sem_acquire_timeout_ms)(semaphore_t *sem, uint32_t timeout_ms) {
return sem_acquire_until(sem, make_timeout_time_ms(timeout_ms));
return sem_acquire_block_until(sem, make_timeout_time_ms(timeout_ms));
}
bool __time_critical_func(sem_acquire_timeout_us)(semaphore_t *sem, uint32_t timeout_us) {
return sem_acquire_until(sem, make_timeout_time_us(timeout_us));
return sem_acquire_block_until(sem, make_timeout_time_us(timeout_us));
}
bool __time_critical_func(sem_acquire_until)(semaphore_t *sem, absolute_time_t until) {
bool __time_critical_func(sem_acquire_block_until)(semaphore_t *sem, absolute_time_t until) {
do {
uint32_t save = spin_lock_blocking(sem->core.spin_lock);
if (sem->permits > 0) {