diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-16 02:18:47 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-09-14 14:45:06 +0200 |
commit | b51f047c28142cdfb7b24641006d0afdcf399292 (patch) | |
tree | 7387a8a62833e78eb232005121b0a7d786c86c6b /vm/vm_object.h | |
parent | 537188a07d5ee6548555260acdd616034c73c7c4 (diff) |
codify locking contracts
Conflicts:
vm/vm_page.h
Diffstat (limited to 'vm/vm_object.h')
-rw-r--r-- | vm/vm_object.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vm/vm_object.h b/vm/vm_object.h index 3c9055f..01ce4ad 100644 --- a/vm/vm_object.h +++ b/vm/vm_object.h @@ -376,8 +376,9 @@ MACRO_END #define vm_object_sleep(event, object, interruptible) \ thread_sleep_lock((event_t)(event), &(object)->Lock, \ (interruptible)) -#define vm_object_lock_taken(object) lock_taken(&(object)->Lock) #endif /* VM_OBJECT_DEBUG */ +#define have_vm_object_lock(object) \ + (object == NULL || have_write_lock(&(object)->Lock)) /* * Page cache accounting. |