| 1299 | } |
| 1300 | |
| 1301 | int thread_yield() |
| 1302 | { |
| 1303 | RunQ rq; |
| 1304 | if_update_now(); |
| 1305 | rq.current->error_number = 0; |
| 1306 | auto sw = AtomicRunQ(rq).goto_next(); |
| 1307 | switch_context(sw.from, sw.to); |
| 1308 | return rq.current->error_number; |
| 1309 | } |
| 1310 | |
| 1311 | inline void thread_yield_fast() { |
| 1312 | auto sw = AtomicRunQ().goto_next(); |