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

Function vm_map_process_deferred

freebsd/vm/vm_map.c:615–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613#define defer_next right
614
615static void
616vm_map_process_deferred(void)
617{
618 struct thread *td;
619 vm_map_entry_t entry, next;
620 vm_object_t object;
621
622 td = curthread;
623 entry = td->td_map_def_user;
624 td->td_map_def_user = NULL;
625 while (entry != NULL) {
626 next = entry->defer_next;
627 MPASS((entry->eflags & (MAP_ENTRY_WRITECNT |
628 MAP_ENTRY_VN_EXEC)) != (MAP_ENTRY_WRITECNT |
629 MAP_ENTRY_VN_EXEC));
630 if ((entry->eflags & MAP_ENTRY_WRITECNT) != 0) {
631 /*
632 * Decrement the object's writemappings and
633 * possibly the vnode's v_writecount.
634 */
635 KASSERT((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0,
636 ("Submap with writecount"));
637 object = entry->object.vm_object;
638 KASSERT(object != NULL, ("No object for writecount"));
639 vm_pager_release_writecount(object, entry->start,
640 entry->end);
641 }
642 vm_map_entry_set_vnode_text(entry, false);
643 vm_map_entry_deallocate(entry, FALSE);
644 entry = next;
645 }
646}
647
648#ifdef INVARIANTS
649static void

Callers 4

_vm_map_unlockFunction · 0.85
_vm_map_unlock_readFunction · 0.85
_vm_map_lock_upgradeFunction · 0.85
vmspace_forkFunction · 0.85

Calls 3

vm_map_entry_deallocateFunction · 0.85

Tested by

no test coverage detected