| 30 | do { if (!(cond)) { fprintf(stderr, "FAIL %s:%d %s\n", __FILE__, __LINE__, #cond); std::exit(1); } } while (0) |
| 31 | |
| 32 | void worker(void *arg) { |
| 33 | int id = (int)(intptr_t)arg; |
| 34 | for (int i = 0; i < 3; i++) { |
| 35 | g_seq[g_seq_n++] = id * 10 + i; |
| 36 | port_coroutine_yield(); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | /* Round-robin alternation: two coroutines, three yields each. The |
| 41 | * expected interleave is a0,b0,a1,b1,a2,b2 because the main loop |
nothing calls this directly
no test coverage detected