6 #include <arch_vmproc.h>
7 #include <minix/bitmap.h>
8 #include <machine/archtypes.h>
14 typedef void (*callback_t
)(struct vmproc
*who
, message
*m
);
17 struct vm_arch vm_arch
; /* architecture-specific data */
19 endpoint_t vm_endpoint
;
20 pt_t vm_pt
; /* page table data, if VMF_HASPT is set */
21 vir_bytes vm_stacktop
; /* top of stack as seen from process */
22 vir_bytes vm_offset
; /* offset of addr 0 for process */
24 /* File identification for cs sharing. */
25 ino_t vm_ino
; /* inode number of file */
26 dev_t vm_dev
; /* device number of file system */
27 time_t vm_ctime
; /* inode changed time */
29 /* Regions in virtual address space. */
30 struct vir_region
*vm_regions
;
33 /* Heap for brk() to extend. */
34 struct vir_region
*vm_heap
;
36 bitchunk_t vm_call_mask
[VM_CALL_MASK_SIZE
];
38 /* State for requests pending to be done to vfs on behalf of
41 callback_t vm_callback
; /* function to call on vfs reply */
42 int vm_callback_type
; /* expected message type */
44 int vm_slot
; /* process table slot */
49 } open
; /* VM_VFS_OPEN */
50 } vm_state
; /* Callback state. */
56 /* Bits for vm_flags */
57 #define VMF_INUSE 0x001 /* slot contains a process */
58 #define VMF_SEPARATE 0x002 /* separate i&d */
59 #define VMF_HASPT 0x004 /* has private page table */
60 #define VMF_EXITING 0x008 /* PM is cleaning up this process */
61 #define VMF_HAS_DMA 0x010 /* Process directly or indirectly granted