* Block the current thread until it is awakened from its sleep queue * or it times out while waiting. */
| 679 | * or it times out while waiting. |
| 680 | */ |
| 681 | int |
| 682 | sleepq_timedwait(const void *wchan, int pri) |
| 683 | { |
| 684 | struct thread *td; |
| 685 | |
| 686 | td = curthread; |
| 687 | MPASS(!(td->td_flags & TDF_SINTR)); |
| 688 | |
| 689 | thread_lock(td); |
| 690 | sleepq_switch(wchan, pri); |
| 691 | |
| 692 | return (sleepq_check_timeout()); |
| 693 | } |
| 694 | |
| 695 | /* |
| 696 | * Block the current thread until it is awakened from its sleep queue, |
no test coverage detected