diff options
Diffstat (limited to 'libcr')
-rw-r--r-- | libcr/coroutine.c | 4 |
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) { |