| 351 | } |
| 352 | |
| 353 | void fiber::schedule_with(fiber_event_t type) |
| 354 | { |
| 355 | int etype; |
| 356 | |
| 357 | switch (type) { |
| 358 | case FIBER_EVENT_T_POLL: |
| 359 | etype = FIBER_EVENT_POLL; |
| 360 | break; |
| 361 | case FIBER_EVENT_T_SELECT: |
| 362 | etype = FIBER_EVENT_SELECT; |
| 363 | break; |
| 364 | case FIBER_EVENT_T_WMSG: |
| 365 | etype = FIBER_EVENT_WMSG; |
| 366 | break; |
| 367 | case FIBER_EVENT_T_IO_URING: |
| 368 | etype = FIBER_EVENT_IO_URING; |
| 369 | break; |
| 370 | case FIBER_EVENT_T_KERNEL: |
| 371 | default: |
| 372 | etype = FIBER_EVENT_KERNEL; |
| 373 | break; |
| 374 | } |
| 375 | |
| 376 | if (!winapi_hook()) { |
| 377 | perror("hook API for windows error"); |
| 378 | } |
| 379 | acl_fiber_schedule_with(etype); |
| 380 | } |
| 381 | |
| 382 | bool fiber::scheduled() |
| 383 | { |
nothing calls this directly
no test coverage detected