diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mach/gnumach.defs | 15 | ||||
-rw-r--r-- | include/mach/mach_types.h | 1 | ||||
-rw-r--r-- | include/mach/vm_wire.h | 30 |
3 files changed, 46 insertions, 0 deletions
diff --git a/include/mach/gnumach.defs b/include/mach/gnumach.defs index 5235df63..b484accc 100644 --- a/include/mach/gnumach.defs +++ b/include/mach/gnumach.defs @@ -35,6 +35,8 @@ GNUMACH_IMPORTS type vm_cache_statistics_data_t = struct[11] of integer_t; +type vm_wire_t = int; + /* * Return page cache statistics for the host on which the target task * resides. @@ -136,3 +138,16 @@ simpleroutine gsync_requeue( wake_one : boolean_t; flags : int); +/* + * If the VM_WIRE_CURRENT flag is passed, specify that the entire + * virtual address space of the target task must not cause page faults. + * + * If the VM_WIRE_FUTURE flag is passed, automatically wire new + * mappings in the address space of the target task. + * + * If the flags are empty (VM_WIRE_NONE), unwire all mappings. + */ +routine vm_wire_all( + host : mach_port_t; + task : vm_task_t; + flags : vm_wire_t); diff --git a/include/mach/mach_types.h b/include/mach/mach_types.h index 87684824..65164a99 100644 --- a/include/mach/mach_types.h +++ b/include/mach/mach_types.h @@ -53,6 +53,7 @@ #include <mach/vm_prot.h> #include <mach/vm_statistics.h> #include <mach/vm_cache_statistics.h> +#include <mach/vm_wire.h> #ifdef MACH_KERNEL #include <kern/task.h> /* for task_array_t */ diff --git a/include/mach/vm_wire.h b/include/mach/vm_wire.h new file mode 100644 index 00000000..1552dfa7 --- /dev/null +++ b/include/mach/vm_wire.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2017 Free Software Foundation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef _MACH_VM_WIRE_H_ +#define _MACH_VM_WIRE_H_ + +typedef int vm_wire_t; + +#define VM_WIRE_NONE 0 +#define VM_WIRE_CURRENT 1 +#define VM_WIRE_FUTURE 2 + +#define VM_WIRE_ALL (VM_WIRE_CURRENT | VM_WIRE_FUTURE) + +#endif /* _MACH_VM_WIRE_H_ */ |