summaryrefslogtreecommitdiff
path: root/include/task.h
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2020-07-09 14:45:56 -0600
committerCommit Bot <commit-bot@chromium.org>2020-07-10 22:21:55 +0000
commit0f713b36be38449cddea2196d1a135d7bdcfb82a (patch)
tree039710aee8c2d3c2b6108e26e8b54da36243592c /include/task.h
parent3b05afd87d249c1318989fda9d0e341ab0d69f91 (diff)
downloadchrome-ec-0f713b36be38449cddea2196d1a135d7bdcfb82a.tar.gz
tests: reset the PD task before every test case
In order to isolate each test and make each test run from a clean state, reuse the TASK_RESET_DONE event to signal to the test code that we should just jump back to the beginning of the PD task BRANCH=none BUG=none TEST=see that tests are reset in child CLs Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: I3c0408ab0dbc3ad3a26f17aadbda1577ffc7d32f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2290650 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/task.h')
-rw-r--r--include/task.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/task.h b/include/task.h
index 7d424b871c..a0db186eb4 100644
--- a/include/task.h
+++ b/include/task.h
@@ -47,7 +47,11 @@
#define TASK_EVENT_DMA_TC BIT(26)
/* ADC interrupt handler event */
#define TASK_EVENT_ADC_DONE BIT(27)
-/* task_reset() that was requested has been completed */
+/*
+ * task_reset() that was requested has been completed
+ *
+ * For test-only builds, may be used by some tasks to restart themselves.
+ */
#define TASK_EVENT_RESET_DONE BIT(28)
/* task_wake() called on task */
#define TASK_EVENT_WAKE BIT(29)