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

Function bufspace_daemon_wakeup

freebsd/kern/vfs_bio.c:615–628  ·  view source on GitHub ↗

* bufspace_daemon_wakeup: * * Wakeup the daemons responsible for freeing clean bufs. */

Source from the content-addressed store, hash-verified

613 * Wakeup the daemons responsible for freeing clean bufs.
614 */
615static void
616bufspace_daemon_wakeup(struct bufdomain *bd)
617{
618
619 /*
620 * avoid the lock if the daemon is running.
621 */
622 if (atomic_fetchadd_int(&bd->bd_running, 1) == 0) {
623 BD_RUN_LOCK(bd);
624 atomic_store_int(&bd->bd_running, 1);
625 wakeup(&bd->bd_running);
626 BD_RUN_UNLOCK(bd);
627 }
628}
629
630/*
631 * bufspace_daemon_wait:

Callers 3

bufspace_adjustFunction · 0.85
bufspace_reserveFunction · 0.85
buf_allocFunction · 0.85

Calls 2

wakeupFunction · 0.70
atomic_fetchadd_intFunction · 0.50

Tested by

no test coverage detected