diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-17 02:20:59 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-17 12:15:04 -0600 |
commit | a3c2e3bb9092f1d17671c22fd7bf5c0de9b61c3a (patch) | |
tree | 357d6d82726f0b2562ec9e4155d2f50f95b8d829 /coroutine.h | |
parent | d58be71b5bf640a117b301d74f4e82110a689561 (diff) |
fixes
Diffstat (limited to 'coroutine.h')
-rw-r--r-- | coroutine.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coroutine.h b/coroutine.h index 77cb0a3..d22eb2e 100644 --- a/coroutine.h +++ b/coroutine.h @@ -32,7 +32,7 @@ void coroutine_task(void); /* core macros for use in a cr_fn_t() *****************************************/ #define cr_begin() switch(_coroutine_table[_cur_cid].state) { case 0: #define cr_exit() do { _coroutine_table[_cur_cid] = (cr_entry_t){0}; return; } while (0) -#define cr_yield() _cr_yield(__COUNTER__) +#define cr_yield() _cr_yield(__COUNTER__+1) #define _cr_yield(_state) do { _coroutine_table[_cur_cid].state = _state; return; case _state:; } while (0) #define cr_end() } |