]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/mach/mach_traps.h
xnu-1504.9.17.tar.gz
[apple/xnu.git] / osfmk / mach / mach_traps.h
index 17514527b2e4cb081167c3e78ad5debaeb027f1c..38298e27ea3264701004d9199a17bb75c16c56b1 100644 (file)
@@ -1,23 +1,29 @@
 /*
- * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
  *
- * @APPLE_LICENSE_HEADER_START@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License").  You may not use this file except in compliance with the
- * License.  Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
  * 
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
  * 
- * @APPLE_LICENSE_HEADER_END@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  */
 /*
  * @OSF_COPYRIGHT@
@@ -133,24 +139,23 @@ extern kern_return_t semaphore_timedwait_signal_trap(
                                unsigned int sec,
                                clock_res_t nsec);
 
-#if            !defined(__LP64__)
-/* these should go away altogether - so no 64 legacy please */
-
-extern kern_return_t init_process(void);
-
-#endif /* !defined(__LP64__) */
+extern kern_return_t clock_sleep_trap(
+                               mach_port_name_t clock_name,
+                               sleep_type_t sleep_type,
+                               int sleep_sec,
+                               int sleep_nsec,
+                               mach_timespec_t *wakeup_time);
 
-#if            !defined(__LP64__)
+#endif /* PRIVATE */
 
-/* more that should go away so no 64-bit legacy please */
 extern kern_return_t macx_swapon(
-                               char *filename,
+                               uint64_t filename,
                                int flags,
                                int size,
                                int priority);
 
 extern kern_return_t macx_swapoff(
-                               char *filename,
+                               uint64_t filename,
                                int flags);
 
 extern kern_return_t macx_triggers(
@@ -165,17 +170,6 @@ extern kern_return_t macx_backing_store_suspend(
 extern kern_return_t macx_backing_store_recovery(
                                int pid);
 
-#endif /* !defined(__LP64__) */
-     
-extern kern_return_t clock_sleep_trap(
-                               mach_port_name_t clock_name,
-                               sleep_type_t sleep_type,
-                               int sleep_sec,
-                               int sleep_nsec,
-                               mach_timespec_t *wakeup_time);
-
-#endif /* PRIVATE */
-
 extern boolean_t swtch_pri(int pri);
 
 extern boolean_t swtch(void);
@@ -224,6 +218,7 @@ extern kern_return_t map_fd(
 /* Syscall data translations routines */
 #define        PAD_(t) (sizeof(uint64_t) <= sizeof(t) \
                ? 0 : sizeof(uint64_t) - sizeof(t))
+#define PAD_ARG_8
 
 #if BYTE_ORDER == LITTLE_ENDIAN
 #define        PADL_(t)        0
@@ -256,6 +251,8 @@ void munge_dddddd(const void *, void *);
 void munge_ddddddd(const void *, void *);  
 void munge_dddddddd(const void *, void *);
 void munge_l(const void *, void *);
+void munge_lw(const void *, void *);
+void munge_lwww(const void *, void *);
 void munge_wl(const void *, void *);  
 void munge_wlw(const void *, void *);  
 void munge_wwwl(const void *, void *);  
@@ -279,6 +276,8 @@ void munge_wwwwwl(const void *, void *);
 #define munge_ddddddd  NULL 
 #define munge_dddddddd  NULL 
 #define munge_l NULL
+#define munge_lw NULL
+#define munge_lwww NULL
 #define munge_wl  NULL 
 #define munge_wlw  NULL 
 #define munge_wwwl  NULL 
@@ -288,31 +287,31 @@ void munge_wwwwwl(const void *, void *);
 #endif /* !__MUNGE_ONCE */
 
 struct kern_invalid_args {
-       register_t dummy;
+       int32_t dummy;
 };
 extern kern_return_t kern_invalid(
                                struct kern_invalid_args *args);
 
 struct mach_reply_port_args {
-       register_t dummy;
+       int32_t dummy;
 };
 extern mach_port_name_t mach_reply_port(
                                struct mach_reply_port_args *args);
 
 struct thread_self_trap_args {
-       register_t dummy;
+       int32_t dummy;
 };
 extern mach_port_name_t thread_self_trap(
                                struct thread_self_trap_args *args);
 
 struct task_self_trap_args {
-       register_t dummy;
+       int32_t dummy;
 };
 extern mach_port_name_t task_self_trap(
                                struct task_self_trap_args *args);
 
 struct host_self_trap_args {
-       register_t dummy;
+       int32_t dummy;
 };
 extern mach_port_name_t host_self_trap(
                                struct host_self_trap_args *args);
@@ -325,6 +324,7 @@ struct mach_msg_overwrite_trap_args {
        PAD_ARG_(mach_port_name_t, rcv_name);
        PAD_ARG_(mach_msg_timeout_t, timeout);
        PAD_ARG_(mach_port_name_t, notify);
+       PAD_ARG_8
        PAD_ARG_(mach_vm_address_t, rcv_msg);  /* Unused on mach_msg_trap */
 };
 extern mach_msg_return_t mach_msg_trap(
@@ -381,13 +381,6 @@ struct semaphore_timedwait_signal_trap_args {
 extern kern_return_t semaphore_timedwait_signal_trap(
                                struct semaphore_timedwait_signal_trap_args *args);
 
-/* not published to LP64 clients */
-struct init_process_args {
-    register_t dummy;
-};
-extern kern_return_t init_process(
-                               struct init_process_args *args);
-
 struct map_fd_args {
        PAD_ARG_(int, fd);
        PAD_ARG_(vm_offset_t, offset);
@@ -421,9 +414,8 @@ struct pid_for_task_args {
 extern kern_return_t pid_for_task(
                                struct pid_for_task_args *args);
 
-/* not published to LP64 clients*/
 struct macx_swapon_args {
-       PAD_ARG_(char *, filename);
+       PAD_ARG_(uint64_t, filename);
        PAD_ARG_(int, flags);
        PAD_ARG_(int, size);
        PAD_ARG_(int, priority);
@@ -432,7 +424,7 @@ extern kern_return_t macx_swapon(
                                struct macx_swapon_args *args);
 
 struct macx_swapoff_args {
-    PAD_ARG_(char *, filename);
+    PAD_ARG_(uint64_t, filename);
     PAD_ARG_(int, flags);
 };
 extern kern_return_t macx_swapoff(
@@ -465,8 +457,14 @@ struct swtch_pri_args {
 extern boolean_t swtch_pri(
                                struct swtch_pri_args *args);
 
+struct pfz_exit_args {
+       int32_t dummy;
+};
+extern kern_return_t pfz_exit(
+                               struct pfz_exit_args *args);
+
 struct swtch_args {
-    register_t dummy;
+    int32_t dummy;
 };
 extern boolean_t swtch(
                                struct swtch_args *args);
@@ -502,7 +500,7 @@ extern kern_return_t mach_wait_until_trap(
                                struct mach_wait_until_trap_args *args);
 
 struct mk_timer_create_trap_args {
-    register_t dummy;
+    int32_t dummy;
 };
 extern mach_port_name_t mk_timer_create_trap(
                                struct mk_timer_create_trap_args *args);
@@ -536,6 +534,7 @@ struct iokit_user_client_trap_args {
        PAD_ARG_(void *, p3);
        PAD_ARG_(void *, p4);
        PAD_ARG_(void *, p5);
+       PAD_ARG_8
        PAD_ARG_(void *, p6);
 };
 kern_return_t iokit_user_client_trap(
@@ -545,6 +544,7 @@ kern_return_t iokit_user_client_trap(
 #undef PADL_
 #undef PADR_
 #undef PAD_ARG_
+#undef PAD_ARG_8
 
 #endif /* XNU_KERNEL_PRIVATE */