FreeBSD/sys/kern/vfs_bio.c
/*
 *	bufmallocadjust:
 *
 *	Adjust the reported bufspace for a malloc managed buffer, possibly
 *	waking any waiters.
 */
Adjust the reported bufspace for a malloc managed buffer, possibly
waking any waiters.
Adjust the reported bufspace for a malloc managed buffer possibly waking any waiters .
static void
bufmallocadjust(struct buf *bp, int bufsize)
{
	int diff;
	KASSERT((bp->b_flags & B_MALLOC) != 0,
	    ("bufmallocadjust: non-malloc buf %p", bp));
	diff = bufsize - bp->b_bufsize;
	if (diff < 0)
		atomic_subtract_long(&bufmallocspace, -diff);
	else
		atomic_add_long(&bufmallocspace, diff);
	bp->b_bufsize = bufsize;
}
static void bufmallocadjust ( struct buf * bp , int bufsize ) { int diff ; KASSERT ( ( bp -> b_flags & B_MALLOC ) != 0 , ( " " , bp ) ) ; diff = bufsize - bp -> b_bufsize ; if ( diff < 0 ) atomic_subtract_long ( & bufmallocspace , - diff ) ; else atomic_add_long ( & bufmallocspace , diff ) ; bp -> b_bufsize = bufsize ; }
bufmallocadjust:
      Adjust the reported bufspace for a malloc managed buffer, possibly
      waking any waiters.
bufmallocadjust : Adjust the reported bufspace for a malloc managed buffer possibly waking any waiters .