summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2023-03-20 15:41:34 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-03-21 16:19:31 +0000
commit524add0e05796ccf23f7ee7cc1867b93d9a8022f (patch)
tree989bc8dd0ffb0d978676c9cbc42534839410d83a
parentc2276c74bf43f1502e2126db0ee93eeca5b93750 (diff)
downloadchrome-ec-524add0e05796ccf23f7ee7cc1867b93d9a8022f.tar.gz
docs/core_runtime.md: Add links to deferred function examples
BRANCH=none BUG=none TEST=view in gitiles Change-Id: I579b74b63531b33d96fab4607c4b56b646bdde5a Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4356020 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
-rw-r--r--docs/core_runtime.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/core_runtime.md b/docs/core_runtime.md
index 4a45136234..b2c237058b 100644
--- a/docs/core_runtime.md
+++ b/docs/core_runtime.md
@@ -148,6 +148,8 @@ Similarly, the HOOK_SECOND and HOOK_TICK hooks are called periodically by the
HOOKS task loop (the *tick* duration is platform-defined and shorter than the
second).
+For examples, of hooks and deferred functions, see the [`hooks` testcases].
+
Note: be specially careful about priority inversions when accessing resources
protected by a mutex (e.g. a shared I2C controller) in a deferred function.
Indeed being the lowest priority task, it might be de-scheduled for long time
@@ -327,3 +329,5 @@ topic.
- TODO: Address the rest of the comments from https://crrev.com/c/445941
\[1]: bitmap: array of bits.
+
+[`hooks` testcases]: ../test/hooks.c