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

Function blockcount_acquire

freebsd/sys/blockcount.h:54–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54static __inline void
55blockcount_acquire(blockcount_t *bc, u_int n)
56{
57#ifdef INVARIANTS
58 u_int old;
59
60 old = atomic_fetchadd_int(&bc->__count, n);
61 KASSERT(old + n > old, ("%s: counter overflow %p", __func__, bc));
62#else
63 atomic_add_int(&bc->__count, n);
64#endif
65}
66
67static __inline void
68blockcount_release(blockcount_t *bc, u_int n)

Callers 3

vm_object_pip_addFunction · 0.85
vm_object_busyFunction · 0.85

Calls 1

atomic_fetchadd_intFunction · 0.50

Tested by

no test coverage detected