diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2021-11-24 13:37:32 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-29 22:04:50 +0000 |
commit | fdb111b606f2fd31dedbd8fbaed29e3ceb027683 (patch) | |
tree | 2a7ac6c806da6aa6734cf46e03c853042b4a0536 /core/nds32 | |
parent | bec6095ba94a83af6affda9e46a5ced4eeaaeabe (diff) | |
download | chrome-ec-fdb111b606f2fd31dedbd8fbaed29e3ceb027683.tar.gz |
task: change task events bitmask to atomic_t
The events bitmask is used only with atomic_* functions or for reading,
so change to variable type to atomic_t.
It shouldn't change the generated code.
It will be useful for incoming commits related to modifying atomic_t
caused by a change in Zephyr upstream (atomic_t from int to long).
BUG=b:207082842
TEST=make buildall && zmake testall && build_compare.sh -b all
BRANCH=main
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: Ia0ff4a20f9ed6c3728b1bd8b6cab3b32ebfcc36b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300321
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'core/nds32')
-rw-r--r-- | core/nds32/task.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/nds32/task.c b/core/nds32/task.c index 3457af2bb5..376ba08ad7 100644 --- a/core/nds32/task.c +++ b/core/nds32/task.c @@ -25,7 +25,7 @@ typedef union { * for __switchto() to work. */ uint32_t sp; /* Saved stack pointer for context switch */ - uint32_t events; /* Bitmaps of received events */ + atomic_t events; /* Bitmaps of received events */ uint64_t runtime; /* Time spent in task */ uint32_t *stack; /* Start of stack */ }; @@ -250,7 +250,7 @@ task_id_t task_get_current(void) return start_called ? (current_task - tasks) : TASK_ID_INVALID; } -uint32_t *task_get_event_bitmap(task_id_t tskid) +atomic_t *task_get_event_bitmap(task_id_t tskid) { task_ *tsk = __task_id_to_ptr(tskid); return &tsk->events; |