diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/atomic.h | 2 | ||||
-rw-r--r-- | core/cortex-m/task.c | 2 | ||||
-rw-r--r-- | core/cortex-m0/atomic.h | 2 | ||||
-rw-r--r-- | core/cortex-m0/task.c | 2 | ||||
-rw-r--r-- | core/host/atomic.h | 2 | ||||
-rw-r--r-- | core/host/task.c | 2 | ||||
-rw-r--r-- | core/minute-ia/atomic.h | 2 | ||||
-rw-r--r-- | core/minute-ia/task.c | 2 | ||||
-rw-r--r-- | core/nds32/atomic.h | 2 | ||||
-rw-r--r-- | core/nds32/task.c | 2 | ||||
-rw-r--r-- | core/riscv-rv32i/atomic.h | 2 | ||||
-rw-r--r-- | core/riscv-rv32i/task.c | 2 |
12 files changed, 12 insertions, 12 deletions
diff --git a/core/cortex-m/atomic.h b/core/cortex-m/atomic.h index 67abfa4a77..4446fb989c 100644 --- a/core/cortex-m/atomic.h +++ b/core/cortex-m/atomic.h @@ -33,7 +33,7 @@ static inline atomic_val_t atomic_sub(atomic_t *addr, atomic_val_t value) return __atomic_fetch_sub(addr, value, __ATOMIC_SEQ_CST); } -static inline atomic_val_t atomic_read_clear(atomic_t *addr) +static inline atomic_val_t atomic_clear(atomic_t *addr) { return __atomic_exchange_n(addr, 0, __ATOMIC_SEQ_CST); } diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c index 9c3068bbc0..8cecafffa3 100644 --- a/core/cortex-m/task.c +++ b/core/cortex-m/task.c @@ -413,7 +413,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched) ret = timer_arm(deadline, me); ASSERT(ret == EC_SUCCESS); } - while (!(evt = atomic_read_clear(&tsk->events))) { + while (!(evt = atomic_clear(&tsk->events))) { /* Remove ourself and get the next task in the scheduler */ __schedule(1, resched); resched = TASK_ID_IDLE; diff --git a/core/cortex-m0/atomic.h b/core/cortex-m0/atomic.h index ad07beee35..79924fa234 100644 --- a/core/cortex-m0/atomic.h +++ b/core/cortex-m0/atomic.h @@ -54,7 +54,7 @@ static inline atomic_val_t atomic_sub(atomic_t *addr, atomic_val_t value) return ATOMIC_OP(sub, addr, value); } -static inline atomic_val_t atomic_read_clear(atomic_t *addr) +static inline atomic_val_t atomic_clear(atomic_t *addr) { atomic_t ret; diff --git a/core/cortex-m0/task.c b/core/cortex-m0/task.c index d8ed4a6376..67da26008e 100644 --- a/core/cortex-m0/task.c +++ b/core/cortex-m0/task.c @@ -334,7 +334,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched) ret = timer_arm(deadline, me); ASSERT(ret == EC_SUCCESS); } - while (!(evt = atomic_read_clear(&tsk->events))) { + while (!(evt = atomic_clear(&tsk->events))) { /* * We need to ensure that the execution priority is actually * decreased after the "cpsie i" in the atomic operation above diff --git a/core/host/atomic.h b/core/host/atomic.h index aaf990dac1..1513823b6f 100644 --- a/core/host/atomic.h +++ b/core/host/atomic.h @@ -33,7 +33,7 @@ static inline atomic_val_t atomic_sub(atomic_t *addr, atomic_val_t value) return __atomic_fetch_sub(addr, value, __ATOMIC_SEQ_CST); } -static inline atomic_val_t atomic_read_clear(atomic_t *addr) +static inline atomic_val_t atomic_clear(atomic_t *addr) { return __atomic_exchange_n(addr, 0, __ATOMIC_SEQ_CST); } diff --git a/core/host/task.c b/core/host/task.c index e73f8c57fe..6b3ff31a81 100644 --- a/core/host/task.c +++ b/core/host/task.c @@ -224,7 +224,7 @@ uint32_t task_wait_event(int timeout_us) pthread_cond_wait(&tasks[tid].resume, &run_lock); /* Resume */ - ret = atomic_read_clear(&tasks[tid].event); + ret = atomic_clear(&tasks[tid].event); pthread_mutex_unlock(&interrupt_lock); return ret; } diff --git a/core/minute-ia/atomic.h b/core/minute-ia/atomic.h index 7c63268963..225bf0329d 100644 --- a/core/minute-ia/atomic.h +++ b/core/minute-ia/atomic.h @@ -62,7 +62,7 @@ static inline atomic_val_t atomic_sub(atomic_t *addr, atomic_val_t value) return __atomic_fetch_sub(addr, value, __ATOMIC_SEQ_CST); } -static inline atomic_val_t atomic_read_clear(atomic_t *addr) +static inline atomic_val_t atomic_clear(atomic_t *addr) { return __atomic_exchange_n(addr, 0, __ATOMIC_SEQ_CST); } diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c index 8a54772ada..6d5be5f92d 100644 --- a/core/minute-ia/task.c +++ b/core/minute-ia/task.c @@ -318,7 +318,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched) ret = timer_arm(deadline, me); ASSERT(ret == EC_SUCCESS); } - while (!(evt = atomic_read_clear(&tsk->events))) { + while (!(evt = atomic_clear(&tsk->events))) { /* Remove ourself and get the next task in the scheduler */ __schedule(1, resched); resched = TASK_ID_IDLE; diff --git a/core/nds32/atomic.h b/core/nds32/atomic.h index f42b91614f..00df72cbcb 100644 --- a/core/nds32/atomic.h +++ b/core/nds32/atomic.h @@ -60,7 +60,7 @@ static inline atomic_val_t atomic_sub(atomic_t *addr, atomic_val_t value) return ret; } -static inline atomic_val_t atomic_read_clear(atomic_t *addr) +static inline atomic_val_t atomic_clear(atomic_t *addr) { atomic_val_t ret; atomic_t volatile *ptr = addr; diff --git a/core/nds32/task.c b/core/nds32/task.c index 2fc2302c67..6c0766635f 100644 --- a/core/nds32/task.c +++ b/core/nds32/task.c @@ -403,7 +403,7 @@ static uint32_t __ram_code __wait_evt(int timeout_us, task_id_t resched) ret = timer_arm(deadline, me); ASSERT(ret == EC_SUCCESS); } - while (!(evt = atomic_read_clear(&tsk->events))) { + while (!(evt = atomic_clear(&tsk->events))) { /* Remove ourself and get the next task in the scheduler */ __schedule(1, resched, 0); resched = TASK_ID_IDLE; diff --git a/core/riscv-rv32i/atomic.h b/core/riscv-rv32i/atomic.h index c8baf9d42b..a4e9db66ed 100644 --- a/core/riscv-rv32i/atomic.h +++ b/core/riscv-rv32i/atomic.h @@ -35,7 +35,7 @@ static inline atomic_val_t atomic_sub(atomic_t *addr, atomic_val_t value) return __atomic_fetch_sub(addr, value, __ATOMIC_SEQ_CST); } -static inline atomic_val_t atomic_read_clear(atomic_t *addr) +static inline atomic_val_t atomic_clear(atomic_t *addr) { return __atomic_exchange_n(addr, 0, __ATOMIC_SEQ_CST); } diff --git a/core/riscv-rv32i/task.c b/core/riscv-rv32i/task.c index b5f78b12d4..e39e854a3e 100644 --- a/core/riscv-rv32i/task.c +++ b/core/riscv-rv32i/task.c @@ -397,7 +397,7 @@ static uint32_t __ram_code __wait_evt(int timeout_us, task_id_t resched) ret = timer_arm(deadline, me); ASSERT(ret == EC_SUCCESS); } - while (!(evt = atomic_read_clear(&tsk->events))) { + while (!(evt = atomic_clear(&tsk->events))) { /* Remove ourself and get the next task in the scheduler */ __schedule(1, resched, 0); resched = TASK_ID_IDLE; |