From fa357459f88bb8f0170d1a68df66e7d068d59996 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Fri, 27 Sep 2024 20:45:36 -0600 Subject: fixes --- libcr/coroutine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcr') diff --git a/libcr/coroutine.c b/libcr/coroutine.c index 34a96b6..0920f23 100644 --- a/libcr/coroutine.c +++ b/libcr/coroutine.c @@ -357,11 +357,11 @@ void cr_yield(void) { void cr_pause_and_yield(void) { assert_cid_state(coroutine_running, == CR_RUNNING); - if (coroutine_table[cid-1].sig_unpause) + if (coroutine_table[coroutine_running-1].sig_unpause) _cr_transition(CR_RUNNABLE); else _cr_transition(CR_PAUSED); - coroutine_table[cid-1].sig_unpause = false; + coroutine_table[coroutine_running-1].sig_unpause = false; } void cr_exit(void) { -- cgit v1.2.3-2-g168b