From 787a6034170b59d55afe8d0a12cb0904f20cb74d Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 16 Aug 2015 02:18:47 +0200 Subject: codify locking contracts Conflicts: vm/vm_page.h --- vm/vm_fault.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vm/vm_fault.c') diff --git a/vm/vm_fault.c b/vm/vm_fault.c index 101ebce..40d1cbc 100644 --- a/vm/vm_fault.c +++ b/vm/vm_fault.c @@ -127,6 +127,7 @@ vm_fault_cleanup( vm_object_t object, vm_page_t top_page) { + assert(have_vm_object_lock(object)); vm_object_paging_end(object); vm_object_unlock(object); @@ -254,6 +255,8 @@ vm_fault_return_t vm_fault_page( goto after_thread_block; } + assert(have_vm_object_lock(first_object)); + vm_stat_sample(SAMPLED_PC_VM_FAULTS_ANY); vm_stat.faults++; /* needs lock XXX */ current_task()->faults++; -- cgit v1.2.3