summaryrefslogtreecommitdiff
path: root/libcr/include
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-17 22:08:54 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-19 20:24:20 -0700
commit91fefb09f03cc49966aee1a7c371f439d1834a4b (patch)
tree0551521c7e9cee17e09d363732704909a85ff0aa /libcr/include
parent58986ed5316acc6d6077541b7b6e754390069d73 (diff)
libcr: Add cr_is_in_intrhandler() and _cr_plat_are_interrupts_enabled()
Diffstat (limited to 'libcr/include')
-rw-r--r--libcr/include/libcr/coroutine.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcr/include/libcr/coroutine.h b/libcr/include/libcr/coroutine.h
index 8aeab7e..dc51a0f 100644
--- a/libcr/include/libcr/coroutine.h
+++ b/libcr/include/libcr/coroutine.h
@@ -153,6 +153,12 @@ bool _cr_plat_save_and_disable_interrupts(void);
void _cr_plat_enable_interrupts(void);
/**
+ * Return whether the current code is running in an interrupt handler
+ * or "normally".
+ */
+bool cr_is_in_intrhandler(void);
+
+/**
* cr_unpause_from_intrhandler() is like cr_unpause(), but safe to
* call from a interrupt handler.
*/