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

Function bdirtysub

freebsd/kern/vfs_bio.c:572–584  ·  view source on GitHub ↗

* bdirtysub: * * Decrement the numdirtybuffers count by one and wakeup any * threads blocked in bwillwrite(). */

Source from the content-addressed store, hash-verified

570 * threads blocked in bwillwrite().
571 */
572static void
573bdirtysub(struct buf *bp)
574{
575 struct bufdomain *bd;
576 int num;
577
578 bd = bufdomain(bp);
579 num = atomic_fetchadd_int(&bd->bd_numdirtybuffers, -1);
580 if (num == (bd->bd_lodirtybuffers + bd->bd_hidirtybuffers) / 2)
581 bdirtywakeup();
582 if (num == bd->bd_lodirtybuffers || num == bd->bd_hidirtybuffers)
583 bd_clear(bd);
584}
585
586/*
587 * bdirtyadd:

Callers 2

bundirtyFunction · 0.85
brelseFunction · 0.85

Calls 4

bdirtywakeupFunction · 0.85
bd_clearFunction · 0.85
bufdomainFunction · 0.70
atomic_fetchadd_intFunction · 0.50

Tested by

no test coverage detected