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