]> Zhao Yanbai Git Server - minix.git/commitdiff
Give RS a page table.
authorCristiano Giuffrida <cristiano@minix3.org>
Mon, 28 Jun 2010 22:07:49 +0000 (22:07 +0000)
committerCristiano Giuffrida <cristiano@minix3.org>
Mon, 28 Jun 2010 22:07:49 +0000 (22:07 +0000)
kernel/perf.h [new file with mode: 0644]
lib/libc/other/_vm_memctl.c [new file with mode: 0644]
lib/libc/syscall/vm_memctl.S [new file with mode: 0644]

diff --git a/kernel/perf.h b/kernel/perf.h
new file mode 100644 (file)
index 0000000..4bf9bb4
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef PERF_H
+#define PERF_H
+
+/* This header file defines all performance-related constants and macros. */
+
+/* Enable copy-on-write optimization for safecopy. */
+#define PERF_USE_COW_SAFECOPY 0
+
+/* Use a private page table for critical system processes. */
+#define PERF_SYS_CORE_FULLVM 0
+
+#endif /* PERF_H */
diff --git a/lib/libc/other/_vm_memctl.c b/lib/libc/other/_vm_memctl.c
new file mode 100644 (file)
index 0000000..13822f4
--- /dev/null
@@ -0,0 +1,12 @@
+#include <lib.h>
+#define vm_memctl _vm_memctl
+#include <unistd.h>
+
+PUBLIC int vm_memctl(endpoint_t ep, int req)
+{
+       message m;
+       m.VM_RS_CTL_ENDPT = ep;
+       m.VM_RS_CTL_REQ = req;
+
+       return _syscall(VM_PROC_NR, VM_RS_MEMCTL, &m);
+}
diff --git a/lib/libc/syscall/vm_memctl.S b/lib/libc/syscall/vm_memctl.S
new file mode 100644 (file)
index 0000000..a56b213
--- /dev/null
@@ -0,0 +1,7 @@
+.text
+.extern        __vm_memctl
+.globl _vm_memctl
+.balign        2
+
+_vm_memctl:
+       jmp     __vm_memctl