From 51e4ec63b745836c33b6f92c9cbfafb8892e1843 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Fri, 15 Nov 2024 20:42:00 -0700 Subject: libcr: Assert that cr_getcid() is only called inside a coroutine --- libcr/coroutine.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libcr/coroutine.c') 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; } -- cgit v1.2.3-2-g168b