Initial revision
authorroland <roland>
Fri, 18 Oct 1991 04:48:56 +0000 (04:48 +0000)
committerroland <roland>
Fri, 18 Oct 1991 04:48:56 +0000 (04:48 +0000)
mach/mach_init.h [new file with mode: 0644]

diff --git a/mach/mach_init.h b/mach/mach_init.h
new file mode 100644 (file)
index 0000000..046be64
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef        _MACH_INIT_H
+
+#define        _MACH_INIT_H    1
+
+#include <mach/mach_types.h>
+
+/* Return the current task's task port.  */
+extern mach_port_t __mach_task_self (void);
+
+/* This cache is initialized at startup.  */
+extern mach_port_t __mach_task_self_;
+#define mach_task_self()       __mach_task_self_
+
+/* Kernel page size..  */
+extern vm_size_t __vm_page_size;
+
+/* Round the address X up to a page boundary.  */
+#define round_page(x)  \
+  ((((vm_offset_t) (x) + __vm_page_size - 1) / __vm_page_size) * \
+   __vm_page_size)
+
+/* Truncate the address X down to a page boundary.  */
+#define trunc_page(x)  \
+  ((((vm_offset_t) (x)) / __vm_page_size) * __vm_page_size)
+
+
+#endif /* mach_init.h */