* Return the number of actual sleepers for the specified queue. */
| 421 | * Return the number of actual sleepers for the specified queue. |
| 422 | */ |
| 423 | u_int |
| 424 | sleepq_sleepcnt(const void *wchan, int queue) |
| 425 | { |
| 426 | struct sleepqueue *sq; |
| 427 | |
| 428 | KASSERT(wchan != NULL, ("%s: invalid NULL wait channel", __func__)); |
| 429 | MPASS((queue >= 0) && (queue < NR_SLEEPQS)); |
| 430 | sq = sleepq_lookup(wchan); |
| 431 | if (sq == NULL) |
| 432 | return (0); |
| 433 | return (sq->sq_blockedcnt[queue]); |
| 434 | } |
| 435 | |
| 436 | static int |
| 437 | sleepq_check_ast_sc_locked(struct thread *td, struct sleepqueue_chain *sc) |
no test coverage detected