* Block the current thread until it is awakened from its sleep queue, * it is interrupted by a signal, or it times out waiting to be awakened. */
| 697 | * it is interrupted by a signal, or it times out waiting to be awakened. |
| 698 | */ |
| 699 | int |
| 700 | sleepq_timedwait_sig(const void *wchan, int pri) |
| 701 | { |
| 702 | int rcatch, rvalt, rvals; |
| 703 | |
| 704 | rcatch = sleepq_catch_signals(wchan, pri); |
| 705 | /* We must always call check_timeout() to clear sleeptimo. */ |
| 706 | rvalt = sleepq_check_timeout(); |
| 707 | rvals = sleepq_check_signals(); |
| 708 | if (rcatch) |
| 709 | return (rcatch); |
| 710 | if (rvals) |
| 711 | return (rvals); |
| 712 | return (rvalt); |
| 713 | } |
| 714 | |
| 715 | /* |
| 716 | * Returns the type of sleepqueue given a waitchannel. |
no test coverage detected