diff options
author | Jett Rink <jettrink@chromium.org> | 2019-04-16 12:43:58 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-24 15:51:09 -0700 |
commit | bd4012d9abbb7b79f537e7adba9627bcd4a50a72 (patch) | |
tree | 137776675c25c27a1925936e6ef9d8af15fc07cb /include/task.h | |
parent | d6cc4f14205a00b6d17d22fb7e74a0c8b063ec85 (diff) | |
download | chrome-ec-bd4012d9abbb7b79f537e7adba9627bcd4a50a72.tar.gz |
tasks: convert TASK_EVENT_CUSTOM macro to bit
We should ensure that all custom task definition are non-zero and fit
with the globally defined events. Add compile time check and change
semantics to specify bit number (instead of making all callers use the
BIT macro).
This also fixes an error with TASK_EVENT_PHY_TX_DONE for ITE being 0.
The bug that made that happen hasn't landed on any firmware branches
that use it though.
BRANCH=none
BUG=none
TEST=builds
Cq-Depend:chrome-internal:1178968,chrome-internal:1178952
Change-Id: I5e1d1312382d200280c548e9128e53f4eddd3e61
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1570607
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Diffstat (limited to 'include/task.h')
-rw-r--r-- | include/task.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/task.h b/include/task.h index 32e62a8384..d56a91986e 100644 --- a/include/task.h +++ b/include/task.h @@ -13,8 +13,8 @@ #include "task_id.h" /* Task event bitmasks */ -/* Tasks may use the bits in TASK_EVENT_CUSTOM for their own events */ -#define TASK_EVENT_CUSTOM(x) (x & 0x0000ffff) +/* Tasks may use the bits in TASK_EVENT_CUSTOM_BIT for their own events */ +#define TASK_EVENT_CUSTOM_BIT(x) BUILD_CHECK_INLINE(BIT(x), BIT(x) & 0x0ffff) /* Used to signal that sysjump preparation has completed */ #define TASK_EVENT_SYSJUMP_READY BIT(16) |