diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2020-09-23 08:11:09 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-01 19:14:24 +0000 |
commit | 47548f0f7b4ad89cdeef0cb48f3adbea9d92d570 (patch) | |
tree | 3bf99883f98129eaebebea1109d496d64fb5151a | |
parent | 5464f91364f648e31437844a923b97cc10388a9d (diff) | |
download | chrome-ec-47548f0f7b4ad89cdeef0cb48f3adbea9d92d570.tar.gz |
zephyr: disable DECLARE_HOOK and DECLARE_DEFERRED macros
Going to guard this away, and then we can create more CLs later that
actually get hooks working.
BUG=b:16899177
BRANCH=none
TEST=compile timer.c in follow-up CLs
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Id92850982aef360d3f5e774d30603d4fe1c30495
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427095
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | include/hooks.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/hooks.h b/include/hooks.h index 52bca8b94d..39f558fe12 100644 --- a/include/hooks.h +++ b/include/hooks.h @@ -279,7 +279,12 @@ struct deferred_data { */ int hook_call_deferred(const struct deferred_data *data, int us); -#ifdef CONFIG_COMMON_RUNTIME +/* + * Hooks are not currently supported by the Zephyr shim. + * TODO(b/168799177): Implement compatible DECLARE_HOOK macro for + * Zephyr OS. + */ +#if defined(CONFIG_COMMON_RUNTIME) && !defined(CONFIG_ZEPHYR) /** * Register a hook routine. * @@ -336,12 +341,11 @@ int hook_call_deferred(const struct deferred_data *data, int us); CONCAT2(routine, _data) \ __attribute__((section(".rodata.deferred"))) \ = {routine} - -#else /* CONFIG_COMMON_RUNTIME */ +#else /* !defined(CONFIG_COMMON_RUNTIME) || defined(CONFIG_ZEPHYR) */ #define DECLARE_HOOK(t, func, p) \ void CONCAT2(unused_hook_, func)(void) { func(); } #define DECLARE_DEFERRED(func) \ void CONCAT2(unused_deferred_, func)(void) { func(); } -#endif /* CONFIG_COMMON_RUNTIME */ +#endif #endif /* __CROS_EC_HOOKS_H */ |