MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sleepq_sleepcnt

Function sleepq_sleepcnt

freebsd/kern/subr_sleepqueue.c:423–434  ·  view source on GitHub ↗

* Return the number of actual sleepers for the specified queue. */

Source from the content-addressed store, hash-verified

421 * Return the number of actual sleepers for the specified queue.
422 */
423u_int
424sleepq_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
436static int
437sleepq_check_ast_sc_locked(struct thread *td, struct sleepqueue_chain *sc)

Callers 4

_sx_xunlock_hardFunction · 0.85
wakeupshlkFunction · 0.85
lockmgr_xunlock_hardFunction · 0.85
__lockmgr_argsFunction · 0.85

Calls 1

sleepq_lookupFunction · 0.85

Tested by

no test coverage detected