]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/dev/dtrace/dtrace_subr.c
xnu-2422.110.17.tar.gz
[apple/xnu.git] / bsd / dev / dtrace / dtrace_subr.c
index 2a2a4b3de4f782d2453105e87849cc6b1476f38f..c609fddec268ac652ff4ee54a5ea95329ce40136 100644 (file)
  */
 
 /*
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*
  * Use is subject to license terms.
  */
 
 /*
- * #pragma ident       "@(#)dtrace_subr.c      1.7     06/04/24 SMI"
+ * #pragma ident       "@(#)dtrace_subr.c      1.8     07/06/05 SMI"
  */
 
 #include <stdarg.h>
  */
 
 #include <stdarg.h>
@@ -37,7 +37,8 @@
 #include <kern/debug.h>
 
 #if defined(__APPLE__)
 #include <kern/debug.h>
 
 #if defined(__APPLE__)
-#define proc_t struct proc
+/* Solaris proc_t is the struct. Darwin's proc_t is a pointer to it. */
+#define proc_t struct proc /* Steer clear of the Darwin typedef for proc_t */
 #endif
 
 /* Copied from an arch specific dtrace_subr.c. */
 #endif
 
 /* Copied from an arch specific dtrace_subr.c. */
@@ -48,18 +49,18 @@ int (*dtrace_fasttrap_probe_ptr)(struct regs *);
  * They're assigned in dtrace.c but Darwin never calls them.
  */
 void (*dtrace_cpu_init)(processorid_t);
  * They're assigned in dtrace.c but Darwin never calls them.
  */
 void (*dtrace_cpu_init)(processorid_t);
+#if !defined(__APPLE__)
 void (*dtrace_modload)(struct modctl *);
 void (*dtrace_modunload)(struct modctl *);
 void (*dtrace_modload)(struct modctl *);
 void (*dtrace_modunload)(struct modctl *);
-#if defined(__APPLE__)
+#else
+int (*dtrace_modload)(struct kmod_info *, uint32_t);
+int (*dtrace_modunload)(struct kmod_info *);
 void (*dtrace_helpers_cleanup)(proc_t *);
 void (*dtrace_helpers_cleanup)(proc_t *);
-#endif
+#endif  /*__APPLE__*/
 void (*dtrace_helpers_fork)(proc_t *, proc_t *);
 void (*dtrace_cpustart_init)(void);
 void (*dtrace_cpustart_fini)(void);
 
 void (*dtrace_helpers_fork)(proc_t *, proc_t *);
 void (*dtrace_cpustart_init)(void);
 void (*dtrace_cpustart_fini)(void);
 
-void (*dtrace_kreloc_init)(void);
-void (*dtrace_kreloc_fini)(void);
-
 void (*dtrace_debugger_init)(void);
 void (*dtrace_debugger_fini)(void);
 
 void (*dtrace_debugger_init)(void);
 void (*dtrace_debugger_fini)(void);