vm: merge i386 and arm pagetable code
[minix.git] / servers / vm / memtype.h
blobb0fff8e4146b2112489a707b79f7d04473f3de4e
2 #ifndef _MEMTYPE_H
3 #define _MEMTYPE_H 1
5 struct vmproc;
6 struct vir_region;
7 struct phys_region;
9 typedef struct mem_type {
10 char *name; /* human-readable name */
11 int (*ev_new)(struct vir_region *region);
12 void (*ev_delete)(struct vir_region *region);
13 int (*ev_reference)(struct phys_region *pr);
14 int (*ev_unreference)(struct phys_region *pr);
15 int (*ev_pagefault)(struct vmproc *vmp, struct vir_region *region,
16 struct phys_region *ph, int write);
17 int (*ev_resize)(struct vmproc *vmp, struct vir_region *vr, vir_bytes len);
18 int (*writable)(struct phys_region *pr);
19 int (*ev_sanitycheck)(struct phys_region *pr, char *file, int line);
20 int (*ev_copy)(struct vir_region *vr, struct vir_region *newvr);
21 u32_t (*regionid)(struct vir_region *vr);
22 int (*refcount)(struct vir_region *vr);
23 } mem_type_t;
25 #endif