diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-30 14:55:35 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-30 14:55:35 -0600 |
commit | d16d8bfeb1766c339da797eb2de3126e63a5a44c (patch) | |
tree | c1bc0c050ab27465a31ee0278fde031df07802af /libcr/include | |
parent | d82d7f59f9227a0ea33d13af3c7ed95e16fdd2e3 (diff) |
make coroutine.c signal-safe, add cr_cid_info()
Diffstat (limited to 'libcr/include')
-rw-r--r-- | libcr/include/libcr/coroutine.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libcr/include/libcr/coroutine.h b/libcr/include/libcr/coroutine.h index f580b09..0c5eac3 100644 --- a/libcr/include/libcr/coroutine.h +++ b/libcr/include/libcr/coroutine.h @@ -126,4 +126,16 @@ cid_t cr_getcid(void); * another as paused; a coroutine may only do those things to itself. */ +/* While the following are defined here unconditionally, the + * implementations are #if'd on CONFIG_COROUTINE_MEASURE_STACK. + */ + +struct cr_cid_info { + size_t stack_cap; + size_t stack_max; + size_t stack_cur; +}; + +void cr_cid_info(cid_t cid, struct cr_cid_info *ret); + #endif /* _COROUTINE_H_ */ |