diff options
author | Jett Rink <jettrink@chromium.org> | 2020-10-29 16:39:21 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-05 21:52:05 +0000 |
commit | 5ed63c8607fe6b58bfeb5ab1580d2c1585250846 (patch) | |
tree | a00f04c1d35381a4f3dfabf1865d1df3c8f31b40 /include/task.h | |
parent | 00844d592d2db088abb32bbfdafa7e1cf3832561 (diff) | |
download | chrome-ec-5ed63c8607fe6b58bfeb5ab1580d2c1585250846.tar.gz |
zephyr: add task shim
Provide shim/translation layer for converting platform/ec tasks into
zephyr threads. Provide implementation API for platform/ec task_ API
BRANCH=none
BUG=b:171741620
TEST=unit test provided
TEST=clean_build.sh ~/chromiumos/src/platform/ec/zephyr/tests/tasks &&
../build/zephyr/zephyr.elf
Change-Id: Ia2a1f808ec56a89c2a08df9de318edb1b6e9f869
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518665
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/task.h')
-rw-r--r-- | include/task.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/task.h b/include/task.h index 3d845b3fd8..56c7aaf60b 100644 --- a/include/task.h +++ b/include/task.h @@ -144,27 +144,17 @@ void set_int_mask(uint32_t val); * interrupt context. * @return The bitmap of events which occurred if wait!=0, else 0. */ -#ifdef CONFIG_ZEPHYR -#define task_set_event(tskid, event, wait) \ - _ZEPHYR_WARN_UNIMPLEMENTED_AND_RETURN(task_set_event, 0L, tskid, \ - event, wait) -#else uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait); -#endif /** * Wake a task. This sends it the TASK_EVENT_WAKE event. * * @param tskid Task to wake */ -#ifdef CONFIG_ZEPHYR -#define task_wake(tskid) _ZEPHYR_WARN_UNIMPLEMENTED(task_wake, tskid) -#else static inline void task_wake(task_id_t tskid) { task_set_event(tskid, TASK_EVENT_WAKE, 0); } -#endif /** * Return the identifier of the task currently running. |