Lines Matching refs:vm_refcnt
290 vm->vm_refcnt = 1; in vmspace_alloc()
349 if (vm->vm_refcnt == 0) in vmspace_free()
352 if (atomic_fetchadd_int(&vm->vm_refcnt, -1) == 1) in vmspace_free()
390 atomic_add_int(&vmspace0.vm_refcnt, 1); in vmspace_exit()
392 refcnt = vm->vm_refcnt; in vmspace_exit()
400 } while (!atomic_cmpset_int(&vm->vm_refcnt, refcnt, refcnt - 1)); in vmspace_exit()
438 refcnt = vm->vm_refcnt; in vmspace_acquire_ref()
443 } while (!atomic_cmpset_int(&vm->vm_refcnt, refcnt, refcnt + 1)); in vmspace_acquire_ref()
475 KASSERT(newvm->vm_refcnt > 0, in vmspace_switch_aio()
486 atomic_add_int(&newvm->vm_refcnt, 1); in vmspace_switch_aio()
4471 if (oldvmspace->vm_refcnt == 1) in vmspace_unshare()