diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2020-09-24 09:20:41 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-06 09:44:48 +0000 |
commit | 32b7e8875e0a08290168ec7dda040d5a5db513fa (patch) | |
tree | c1336b4c3c0a5e037618bef1ae944485e3f7840b /core/riscv-rv32i/task.c | |
parent | b536c348359487f0408a17af8d9d506f5a1d18a6 (diff) | |
download | chrome-ec-32b7e8875e0a08290168ec7dda040d5a5db513fa.tar.gz |
core: rename atomic_clear to atomic_clear_bits
Change the name of atomic_clear to atomic_clear_bits to make to name more
clear - the function clears only selected bits, but the name may suggest
that it clears the whole variable.
It is done as a part of porting to Zephyr, where atomic_clear zeros the
variable.
BUG=b:169151160
BRANCH=none
TEST=buildall
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I7b0b47959c6c54af40f61bca8d9baebaa0375970
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428943
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'core/riscv-rv32i/task.c')
-rw-r--r-- | core/riscv-rv32i/task.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/riscv-rv32i/task.c b/core/riscv-rv32i/task.c index 862f9e3b81..ecd8d72382 100644 --- a/core/riscv-rv32i/task.c +++ b/core/riscv-rv32i/task.c @@ -405,7 +405,7 @@ static uint32_t __ram_code __wait_evt(int timeout_us, task_id_t resched) if (timeout_us > 0) { timer_cancel(me); /* Ensure timer event is clear, we no longer care about it */ - deprecated_atomic_clear(&tsk->events, TASK_EVENT_TIMER); + deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_TIMER); } return evt; } @@ -499,7 +499,7 @@ void task_enable_task(task_id_t tskid) void task_disable_task(task_id_t tskid) { - deprecated_atomic_clear(&tasks_enabled, BIT(tskid)); + deprecated_atomic_clear_bits(&tasks_enabled, BIT(tskid)); if (!in_interrupt_context() && tskid == task_get_current()) __schedule(0, 0, 0); @@ -575,7 +575,7 @@ void __ram_code mutex_lock(struct mutex *mtx) task_wait_event_mask(TASK_EVENT_MUTEX, 0); } - deprecated_atomic_clear(&mtx->waiters, id); + deprecated_atomic_clear_bits(&mtx->waiters, id); } void __ram_code mutex_unlock(struct mutex *mtx) @@ -599,7 +599,7 @@ void __ram_code mutex_unlock(struct mutex *mtx) } /* Ensure no event is remaining from mutex wake-up */ - deprecated_atomic_clear(&tsk->events, TASK_EVENT_MUTEX); + deprecated_atomic_clear_bits(&tsk->events, TASK_EVENT_MUTEX); } void task_print_list(void) |