| 376 | } |
| 377 | |
| 378 | void thread_coop_enable(void) |
| 379 | { |
| 380 | struct thread *current; |
| 381 | |
| 382 | current = current_thread(); |
| 383 | |
| 384 | if (current == NULL) |
| 385 | return; |
| 386 | |
| 387 | assert(current->can_yield <= 0); |
| 388 | |
| 389 | current->can_yield++; |
| 390 | } |
| 391 | |
| 392 | void thread_coop_disable(void) |
| 393 | { |
no test coverage detected