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

Function vm_object_reference_locked

freebsd/vm/vm_object.c:520–531  ·  view source on GitHub ↗

* vm_object_reference_locked: * * Gets another reference to the given object. * * The object must be locked. */

Source from the content-addressed store, hash-verified

518 * The object must be locked.
519 */
520void
521vm_object_reference_locked(vm_object_t object)
522{
523 u_int old;
524
525 VM_OBJECT_ASSERT_LOCKED(object);
526 old = refcount_acquire(&object->ref_count);
527 if (object->type == OBJT_VNODE && old == 0)
528 vref(object->handle);
529 KASSERT((object->flags & OBJ_DEAD) == 0,
530 ("vm_object_reference: Referenced dead object."));
531}
532
533/*
534 * Handle deallocating an object of type OBJT_VNODE.

Callers 8

sendfile_getobjFunction · 0.85
shm_mapFunction · 0.85
vm_map_copy_swap_objectFunction · 0.85
vm_object_shadowFunction · 0.85
vm_faultFunction · 0.85
vm_pager_object_lookupFunction · 0.85
vm_pageout_cleanFunction · 0.85

Calls 2

refcount_acquireFunction · 0.85
vrefFunction · 0.50

Tested by

no test coverage detected