static void thread_run(struct coopth_t *thr, struct coopth_per_thread_t *pth) { enum CoopthState state; do { __thread_run(thr, pth); state = pth->st.state; } while (state == COOPTHS_RUNNING); }
static void thread_run(struct coopth_t *thr, struct coopth_per_thread_t *pth) { enum CoopthState state; do { __thread_run(thr, pth); state = pth->st.state; } while (state == COOPTHS_RUNNING || (state == COOPTHS_SWITCH && pth->data.atomic_switch)); }