summaryrefslogtreecommitdiff
path: root/zephyr/shim
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-02-07 16:33:20 -0700
committerCommit Bot <commit-bot@chromium.org>2022-02-10 02:25:34 +0000
commitc19829dcc0d033c18932707ea7c157755df6a45e (patch)
tree410a2354fbb8a8b9bfe5194b305dcd1f56080898 /zephyr/shim
parent08983bdb1b53b769bc05ca7f7564d6ed9d6f74dc (diff)
downloadchrome-ec-c19829dcc0d033c18932707ea7c157755df6a45e.tar.gz
zephyr: Check that the tasks run at non-idle
If there are too many EC tasks, some of them will run at idle or sub-idle priorities. Check for that and fail to build. BRANCH=None BUG=None TEST=None Change-Id: I2ea3a834f52f558bc09408f0ee11882b2735d928 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3441093 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/shim')
-rw-r--r--zephyr/shim/src/tasks.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/zephyr/shim/src/tasks.c b/zephyr/shim/src/tasks.c
index 67005c473e..2226b9a54a 100644
--- a/zephyr/shim/src/tasks.c
+++ b/zephyr/shim/src/tasks.c
@@ -289,6 +289,11 @@ ZTEST_RULE(set_test_runner_tid, set_test_runner_tid_rule_before, NULL);
#endif /* CONFIG_SET_TEST_RUNNER_TID_RULE */
#endif /* TEST_BUILD */
+#if K_PRIO_PREEMPT(TASK_ID_COUNT - 1) >= K_IDLE_PRIO
+#error CONFIG_NUM_PREEMPT_PRIORITIES too small, some tasks would run at idle \
+ priority
+#endif
+
void start_ec_tasks(void)
{
int priority;