9 typedef void (*vfs_callback_t
)(struct vmproc
*vmp
, message
*m
,
12 typedef struct mem_type
{
13 const char *name
; /* human-readable name */
14 int (*ev_new
)(struct vir_region
*region
);
15 void (*ev_delete
)(struct vir_region
*region
);
16 int (*ev_reference
)(struct phys_region
*pr
, struct phys_region
*newpr
);
17 int (*ev_unreference
)(struct phys_region
*pr
);
18 int (*ev_pagefault
)(struct vmproc
*vmp
, struct vir_region
*region
,
19 struct phys_region
*ph
, int write
, vfs_callback_t cb
, void *state
,
21 int (*ev_resize
)(struct vmproc
*vmp
, struct vir_region
*vr
, vir_bytes len
);
22 void (*ev_split
)(struct vmproc
*vmp
, struct vir_region
*vr
,
23 struct vir_region
*r1
, struct vir_region
*r2
);
24 int (*writable
)(struct phys_region
*pr
);
25 int (*ev_sanitycheck
)(struct phys_region
*pr
, const char *file
, int line
);
26 int (*ev_copy
)(struct vir_region
*vr
, struct vir_region
*newvr
);
27 int (*ev_lowshrink
)(struct vir_region
*vr
, vir_bytes len
);
28 u32_t (*regionid
)(struct vir_region
*vr
);
29 int (*refcount
)(struct vir_region
*vr
);
30 int (*pt_flags
)(struct vir_region
*vr
); /* page table flags */