]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/mach/mach_types.h
xnu-792.tar.gz
[apple/xnu.git] / osfmk / mach / mach_types.h
index 7e9f87002b554437bb3cce0ce84d29036b3bd769..486d3be41ab72e48e3b46175ae8bafd6ac913d5f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
 
 #include <stdint.h>
 
+#include <sys/cdefs.h>
+
 #include <mach/host_info.h>
 #include <mach/host_notify.h>
 #include <mach/host_special_ports.h>
 #include <mach/machine.h>
 #include <mach/machine/vm_types.h>
 #include <mach/memory_object_types.h>
+#include <mach/message.h>
 #include <mach/exception_types.h>
 #include <mach/port.h>
 #include <mach/processor_info.h>
@@ -83,6 +86,7 @@
 #include <mach/clock_types.h>
 #include <mach/vm_attributes.h>
 #include <mach/vm_inherit.h>
+#include <mach/vm_purgable.h>
 #include <mach/vm_behavior.h>
 #include <mach/vm_prot.h>
 #include <mach/vm_statistics.h>
@@ -91,7 +95,7 @@
 #include <mach/vm_region.h>
 #include <mach/kmod.h>
 
-#ifdef KERNEL_PRIVATE
+#ifdef KERNEL
 
 #include <mach/vm_param.h>
 
@@ -115,14 +119,10 @@ typedef   struct alarm                    *alarm_t;
 typedef        struct clock                    *clock_serv_t;
 typedef        struct clock                    *clock_ctrl_t;
 
-#if !defined(MACH_KERNEL_PRIVATE)
+#ifndef        MACH_KERNEL_PRIVATE
+
+__BEGIN_DECLS
 
-/*
- * Declare empty structure definitions for export to other
- * kernel components.  This lets us still provide some level
- * of type checking, without exposing our internal data
- * structures.
- */
 struct task ;
 struct thread ;
 struct host ;
@@ -134,9 +134,11 @@ struct ledger ;
 struct alarm ;
 struct clock ;
 
-#endif /* !MACH_KERNEL_PRIVATE */
+__END_DECLS
 
-#else  /* !KERNEL_PRIVATE */
+#endif /* MACH_KERNEL_PRIVATE */
+
+#else  /* KERNEL */
 
 /*
  * If we are not in the kernel, then these will all be represented by
@@ -159,7 +161,7 @@ typedef mach_port_t         alarm_t;
 typedef mach_port_t            clock_serv_t;
 typedef mach_port_t            clock_ctrl_t;
 
-#endif /* !KERNEL_PRIVATE */
+#endif /* KERNEL */
 
 /*
  * These aren't really unique types.  They are just called
@@ -169,7 +171,7 @@ typedef mach_port_t         clock_ctrl_t;
 typedef processor_set_t                processor_set_name_t;
 
 /*
- * JMM - These types are just hard-coded as ports for now
+ * These types are just hard-coded as ports
  */
 typedef mach_port_t            clock_reply_t;
 typedef mach_port_t            bootstrap_t;
@@ -181,11 +183,11 @@ typedef mach_port_t               io_master_t;
 typedef mach_port_t            UNDServerRef;
 
 /*
- * JMM - Mig doesn't translate the components of an array.
+ * Mig doesn't translate the components of an array.
  * For example, Mig won't use the thread_t translations
  * to translate a thread_array_t argument.  So, these definitions
  * are not completely accurate at the moment for other kernel
- * components. MIG is being fixed.
+ * components.
  */
 typedef task_t                 *task_array_t;
 typedef thread_t               *thread_array_t;
@@ -195,7 +197,6 @@ typedef processor_t         *processor_array_t;
 typedef        thread_act_t            *thread_act_array_t;
 typedef ledger_t               *ledger_array_t;
 
-
 /*
  * However the real mach_types got declared, we also have to declare
  * types with "port" in the name for compatability with the way OSF
@@ -244,8 +245,10 @@ typedef exception_handler_array_t exception_port_arrary_t;
 #define CLOCK_NULL             ((clock_t) 0)
 #define UND_SERVER_NULL                ((UNDServerRef) 0)
 
-typedef integer_t              ledger_item_t;
-typedef vm_offset_t            *emulation_vector_t;
+typedef natural_t              ledger_item_t;
+#define LEDGER_ITEM_INFINITY ((ledger_item_t) (~0))
+
+typedef mach_vm_offset_t       *emulation_vector_t;
 typedef char                   *user_subsystem_t;
 
 /*