Fixed extern declaration from pointer to array
[minix.git] / servers / vm / vmproc.h
blobdc840956b277f2f024e66345c261bbbc9256de50
2 #ifndef _VMPROC_H
3 #define _VMPROC_H 1
5 #include <pagetable.h>
6 #include <arch_vmproc.h>
7 #include <minix/bitmap.h>
9 #include "vm.h"
11 struct vmproc;
13 typedef void (*callback_t)(struct vmproc *who, message *m);
15 struct vmproc {
16 struct vm_arch vm_arch; /* architecture-specific data */
17 int vm_flags;
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;
30 int vm_count;
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
38 * this process.
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 */
45 union {
46 struct {
47 cp_grant_id_t gid;
48 } open; /* VM_VFS_OPEN */
49 } vm_state; /* Callback state. */
50 #if VMSTATS
51 int vm_bytecopies;
52 #endif
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
61 * DMA buffers.
64 #endif