summaryrefslogtreecommitdiff
path: root/zephyr/shim/src
diff options
context:
space:
mode:
authorTim Lin <tim2.lin@ite.corp-partner.google.com>2021-08-04 16:44:48 +0800
committerCommit Bot <commit-bot@chromium.org>2021-08-05 04:37:51 +0000
commit3c5df7ae8af62a0ea2a8c165908625eed2d47bfb (patch)
treea383b17414f9dc7f76c84bd74964fd174da080f9 /zephyr/shim/src
parent6df113fcdce5125e356dc1ef31fee99a0a935ccf (diff)
downloadchrome-ec-3c5df7ae8af62a0ea2a8c165908625eed2d47bfb.tar.gz
zephyr: shim/src: task: add in_interrupt_context routine
This routine is needed when enable CONFIG_HOST_COMMAND_STATUS. This routine allows the caller to customize its actions, depending on whether it is a thread or an ISR. BUG=b:195342437 BRANCH=none TEST=zmake testall Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: Id2a948c67de81fbc8ee161e5711cff17b8ac359d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070941 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'zephyr/shim/src')
-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 9b2a04fe14..5b636fc523 100644
--- a/zephyr/shim/src/tasks.c
+++ b/zephyr/shim/src/tasks.c
@@ -318,3 +318,8 @@ void task_enable_irq(int irq)
{
arch_irq_enable(irq);
}
+
+inline int in_interrupt_context(void)
+{
+ return k_is_in_isr();
+}