From a3c2e3bb9092f1d17671c22fd7bf5c0de9b61c3a Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Tue, 17 Sep 2024 02:20:59 -0600 Subject: fixes --- coroutine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coroutine.h') 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() } -- cgit v1.2.3-2-g168b