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

Function _blockcount_wakeup

freebsd/kern/kern_synch.c:391–400  ·  view source on GitHub ↗

* Signal sleeping waiters after the counter has reached zero. */

Source from the content-addressed store, hash-verified

389 * Signal sleeping waiters after the counter has reached zero.
390 */
391void
392_blockcount_wakeup(blockcount_t *bc, u_int old)
393{
394
395 KASSERT(_BLOCKCOUNT_WAITERS(old),
396 ("%s: no waiters on %p", __func__, bc));
397
398 if (atomic_cmpset_int(&bc->__count, _BLOCKCOUNT_WAITERS_FLAG, 0))
399 wakeup(bc);
400}
401
402/*
403 * Wait for a wakeup or a signal. This does not guarantee that the count is

Callers 1

blockcount_releaseFunction · 0.85

Calls 1

wakeupFunction · 0.70

Tested by

no test coverage detected