diff options
Diffstat (limited to 'zephyr/shim/include/ec_tasks.h')
-rw-r--r-- | zephyr/shim/include/ec_tasks.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/zephyr/shim/include/ec_tasks.h b/zephyr/shim/include/ec_tasks.h index 0380920492..1f050302a0 100644 --- a/zephyr/shim/include/ec_tasks.h +++ b/zephyr/shim/include/ec_tasks.h @@ -6,7 +6,17 @@ #ifndef __CROS_EC_EC_TASKS_H #define __CROS_EC_EC_TASKS_H +/* + * The lowest preemptive thread priority is (CONFIG_NUM_PREEMT_PRIORITIES-1) + * while the lowest cooperative thread priority is -1. + * + * https://docs.zephyrproject.org/latest/reference/kernel/threads/index.html#thread-priorities + */ +#define LOWEST_THREAD_PRIORITY \ + COND_CODE_1(CONFIG_PREEMPT_ENABLED, \ + (CONFIG_NUM_PREEMPT_PRIORITIES - 1), (-1)) + /** Starts all of the shimmed EC tasks. Requires CONFIG_SHIMMED_TASKS=y. */ void start_ec_tasks(void); -#endif /* __CROS_EC_EC_TASKS_H */ +#endif /* __CROS_EC_EC_TASKS_H */ |