* Busy the vm object. This prevents new pages belonging to the object from * becoming busy. Existing pages persist as busy. Callers are responsible * for checking page state before proceeding. */
| 2454 | * for checking page state before proceeding. |
| 2455 | */ |
| 2456 | void |
| 2457 | vm_object_busy(vm_object_t obj) |
| 2458 | { |
| 2459 | |
| 2460 | VM_OBJECT_ASSERT_LOCKED(obj); |
| 2461 | |
| 2462 | blockcount_acquire(&obj->busy, 1); |
| 2463 | /* The fence is required to order loads of page busy. */ |
| 2464 | atomic_thread_fence_acq_rel(); |
| 2465 | } |
| 2466 | |
| 2467 | void |
| 2468 | vm_object_unbusy(vm_object_t obj) |
no test coverage detected