diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2021-06-15 16:38:10 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2021-06-15 16:38:10 +0000 |
commit | 5d6c16d5d85107b9af040001d9b6226ba5c081c1 (patch) | |
tree | 6e5d2fb097daf2dc19f70fc597a743bcc1b6acca /sys/uvm/uvm_object.h | |
parent | 5922d1764de33186122539ceaa19c8970cecc243 (diff) |
Use a macro to assert that given uobjs correspond to anonymous objects.
Reduce the difference with NetBSD.
ok kettenis@
Diffstat (limited to 'sys/uvm/uvm_object.h')
-rw-r--r-- | sys/uvm/uvm_object.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/uvm/uvm_object.h b/sys/uvm/uvm_object.h index ebee2ce1545..0b6d59d08da 100644 --- a/sys/uvm/uvm_object.h +++ b/sys/uvm/uvm_object.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_object.h,v 1.24 2020/10/21 09:08:14 mpi Exp $ */ +/* $OpenBSD: uvm_object.h,v 1.25 2021/06/15 16:38:09 mpi Exp $ */ /* $NetBSD: uvm_object.h,v 1.11 2001/03/09 01:02:12 chs Exp $ */ /* @@ -82,13 +82,16 @@ RBT_PROTOTYPE(uvm_objtree, vm_page, objt, uvm_pagecmp) #define UVM_OBJ_IS_VNODE(uobj) \ ((uobj)->pgops == &uvm_vnodeops) -#define UVM_OBJ_IS_DEVICE(uobj) \ +#define UVM_OBJ_IS_DEVICE(uobj) \ ((uobj)->pgops == &uvm_deviceops) #define UVM_OBJ_IS_VTEXT(uobj) \ ((uobj)->pgops == &uvm_vnodeops && \ ((struct vnode *)uobj)->v_flag & VTEXT) +#define UVM_OBJ_IS_AOBJ(uobj) \ + ((uobj)->pgops == &aobj_pager) + void uvm_objinit(struct uvm_object *, const struct uvm_pagerops *, int); int uvm_objwire(struct uvm_object *, voff_t, voff_t, struct pglist *); void uvm_objunwire(struct uvm_object *, voff_t, voff_t); |