aboutsummaryrefslogtreecommitdiff
path: root/include/mach/vm_wire.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2016-12-24 02:31:34 +0100
committerRichard Braun <rbraun@sceen.net>2016-12-24 02:31:34 +0100
commit2b0f19f602e08fd9d37268233b962674fd592634 (patch)
tree90a4bfa49483ccdcddbbcd20749de7f864272d64 /include/mach/vm_wire.h
parent023401c5b97023670a44059a60eb2a3a11c8a929 (diff)
downloadgnumach-2b0f19f602e08fd9d37268233b962674fd592634.tar.gz
gnumach-2b0f19f602e08fd9d37268233b962674fd592634.tar.bz2
gnumach-2b0f19f602e08fd9d37268233b962674fd592634.zip
VM: add the vm_wire_all call
This call maps the POSIX mlockall and munlockall calls. * Makefrag.am (include_mach_HEADERS): Add include/mach/vm_wire.h. * include/mach/gnumach.defs (vm_wire_t): New type. (vm_wire_all): New routine. * include/mach/mach_types.h: Include mach/vm_wire.h. * vm/vm_map.c: Likewise. (vm_map_enter): Automatically wire new entries if requested. (vm_map_copyout): Likewise. (vm_map_pageable_all): New function. vm/vm_map.h: Include mach/vm_wire.h. (struct vm_map): Update description of member `wiring_required'. (vm_map_pageable_all): New function. * vm/vm_user.c (vm_wire_all): New function.
Diffstat (limited to 'include/mach/vm_wire.h')
-rw-r--r--include/mach/vm_wire.h30
1 files changed, 30 insertions, 0 deletions
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_ */