vm: merge i386 and arm pagetable code
[minix.git] / servers / vm / vmproc.h
blob1c9c488bcadbaa9de30786e53f18c83e1669c4c2
2 #ifndef _VMPROC_H
3 #define _VMPROC_H 1
5 #include <minix/bitmap.h>
6 #include <machine/archtypes.h>
8 #include "pt.h"
9 #include "vm.h"
10 #include "physravl.h"
11 #include "yieldedavl.h"
12 #include "regionavl.h"
14 struct vmproc;
16 typedef void (*callback_t)(struct vmproc *who, message *m);
18 struct vmproc {
19 int vm_flags;
20 endpoint_t vm_endpoint;
21 pt_t vm_pt; /* page table data */
22 struct boot_image *vm_boot; /* if boot time process */
24 /* Regions in virtual address space. */
25 region_avl vm_regions_avl;
26 vir_bytes vm_region_top; /* highest vaddr last inserted */
28 bitchunk_t vm_call_mask[VM_CALL_MASK_SIZE];
30 /* State for requests pending to be done to vfs on behalf of
31 * this process.
33 callback_t vm_callback; /* function to call on vfs reply */
34 int vm_callback_type; /* expected message type */
36 int vm_slot; /* process table slot */
37 int vm_yielded; /* yielded regions */
39 union {
40 struct {
41 cp_grant_id_t gid;
42 } open; /* VM_VFS_OPEN */
43 } vm_state; /* Callback state. */
44 #if VMSTATS
45 int vm_bytecopies;
46 #endif
49 /* Bits for vm_flags */
50 #define VMF_INUSE 0x001 /* slot contains a process */
51 #define VMF_EXITING 0x002 /* PM is cleaning up this process */
52 #define VMF_WATCHEXIT 0x008 /* Store in queryexit table */
54 #endif