summaryrefslogtreecommitdiff
path: root/libcr
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-27 20:45:36 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-27 20:45:36 -0600
commitfa357459f88bb8f0170d1a68df66e7d068d59996 (patch)
tree8585b5755ae224c6609f982d973141f1f6bad97b /libcr
parentd54ddec236bf9bdb8c032cd5fbdb0aa46ffebe86 (diff)
fixes
Diffstat (limited to 'libcr')
-rw-r--r--libcr/coroutine.c4
1 files changed, 2 insertions, 2 deletions
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) {