Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_umtx.c
Show First 20 Lines • Show All 4,361 Lines • ▼ Show 20 Lines | |||||
umtx_shm_unref_reg(struct umtx_shm_reg *reg, bool force) | umtx_shm_unref_reg(struct umtx_shm_reg *reg, bool force) | ||||
{ | { | ||||
vm_object_t object; | vm_object_t object; | ||||
bool dofree; | bool dofree; | ||||
if (force) { | if (force) { | ||||
object = reg->ushm_obj->shm_object; | object = reg->ushm_obj->shm_object; | ||||
VM_OBJECT_WLOCK(object); | VM_OBJECT_WLOCK(object); | ||||
object->flags |= OBJ_UMTXDEAD; | vm_object_set_flag(object, OBJ_UMTXDEAD); | ||||
VM_OBJECT_WUNLOCK(object); | VM_OBJECT_WUNLOCK(object); | ||||
} | } | ||||
mtx_lock(&umtx_shm_lock); | mtx_lock(&umtx_shm_lock); | ||||
dofree = umtx_shm_unref_reg_locked(reg, force); | dofree = umtx_shm_unref_reg_locked(reg, force); | ||||
mtx_unlock(&umtx_shm_lock); | mtx_unlock(&umtx_shm_lock); | ||||
if (dofree) | if (dofree) | ||||
umtx_shm_free_reg(reg); | umtx_shm_free_reg(reg); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 744 Lines • Show Last 20 Lines |