vm: use assert() instead of vm_assert(); remove vm_assert().
[minix.git] / servers / vm / vmproc.h
blobe051473822a3cff30efe7e6da040b6e035ff131e
2 #ifndef _VMPROC_H
3 #define _VMPROC_H 1
5 #include <pagetable.h>
6 #include <arch_vmproc.h>
7 #include <minix/bitmap.h>
8 #include <machine/archtypes.h>
10 #include "vm.h"
12 struct vmproc;
14 typedef void (*callback_t)(struct vmproc *who, message *m);
16 struct vmproc {
17 struct vm_arch vm_arch; /* architecture-specific data */
18 int vm_flags;
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;
31 int vm_count;
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
39 * this process.
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 */
46 union {
47 struct {
48 cp_grant_id_t gid;
49 } open; /* VM_VFS_OPEN */
50 } vm_state; /* Callback state. */
51 #if VMSTATS
52 int vm_bytecopies;
53 #endif
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
62 * DMA buffers.
65 #endif