kernel: restore setting KTS_NONE
[minix.git] / servers / vm / vmproc.h
blobded51ff441c94cac7605f2dcac34a8f35683785a
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 "regionavl.h"
12 struct vmproc;
14 typedef void (*callback_t)(struct vmproc *who, message *m);
16 struct vmproc {
17 int vm_flags;
18 endpoint_t vm_endpoint;
19 pt_t vm_pt; /* page table data */
20 struct boot_image *vm_boot; /* if boot time process */
22 /* Regions in virtual address space. */
23 region_avl vm_regions_avl;
24 vir_bytes vm_region_top; /* highest vaddr last inserted */
26 bitchunk_t vm_call_mask[VM_CALL_MASK_SIZE];
28 /* State for requests pending to be done to vfs on behalf of
29 * this process.
31 callback_t vm_callback; /* function to call on vfs reply */
32 int vm_callback_type; /* expected message type */
34 int vm_slot; /* process table slot */
35 int vm_yielded; /* yielded regions */
37 union {
38 struct {
39 cp_grant_id_t gid;
40 } open; /* VM_VFS_OPEN */
41 } vm_state; /* Callback state. */
42 #if VMSTATS
43 int vm_bytecopies;
44 #endif
47 /* Bits for vm_flags */
48 #define VMF_INUSE 0x001 /* slot contains a process */
49 #define VMF_EXITING 0x002 /* PM is cleaning up this process */
50 #define VMF_WATCHEXIT 0x008 /* Store in queryexit table */
52 #endif