diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-15 20:42:00 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-19 20:15:48 -0700 |
commit | 51e4ec63b745836c33b6f92c9cbfafb8892e1843 (patch) | |
tree | f54fc1ccdf67c61bd5959e5ab625c3846d8a590f /libcr/coroutine.c | |
parent | 7aa534178293279b861a6dc36499c179aa70cdfb (diff) |
libcr: Assert that cr_getcid() is only called inside a coroutine
Diffstat (limited to 'libcr/coroutine.c')
-rw-r--r-- | libcr/coroutine.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libcr/coroutine.c b/libcr/coroutine.c index 7f61e94..9f1150b 100644 --- a/libcr/coroutine.c +++ b/libcr/coroutine.c @@ -606,6 +606,7 @@ void cr_unpause_from_intrhandler(cid_t cid) { } cid_t cr_getcid(void) { + assert_cid_state(coroutine_running, state == CR_RUNNING); return coroutine_running; } |