| 55 | // st_switch_cb_t st_set_switch_out_cb(st_switch_cb_t cb); |
| 56 | |
| 57 | st_thread_t st_thread_create(void *(*start)(void *arg), void *arg, |
| 58 | int joinable, int stack_size) { |
| 59 | if (stack_size == 0) |
| 60 | stack_size = photon::DEFAULT_STACK_SIZE; |
| 61 | auto th = photon::thread_create(start, arg, stack_size); |
| 62 | if (joinable) photon::thread_enable_join(th); |
| 63 | return th; |
| 64 | } |
| 65 | |
| 66 | void st_thread_exit(void *retval) { |
| 67 | photon::thread_exit(retval); |