]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/cpu_data.h
xnu-517.7.7.tar.gz
[apple/xnu.git] / osfmk / kern / cpu_data.h
index 7ff974ca371edb4c63ca8eeba7bcc87ee1d353a3..eee782728d2d308f236b98926cecf1b5e5258ea2 100644 (file)
 #ifndef        _CPU_DATA_H_
 #define        _CPU_DATA_H_
 
-#ifdef MACH_KERNEL_PRIVATE
-#include <cpus.h>
-#include <mach/mach_types.h>
+#include <sys/appleapiopts.h>
+
+#ifdef __APPLE_API_PRIVATE
 
-typedef struct
-{
-       thread_t        active_thread;
-       int             preemption_level;
-       int             simple_lock_count;
-       int             interrupt_level;
-#ifdef __I386__
-       int             cpu_number;             /* Logical CPU number */
-       int             cpu_phys_number;        /* Physical CPU Number */
-#endif
-} cpu_data_t;
+#ifdef MACH_KERNEL_PRIVATE
 
-extern cpu_data_t      cpu_data[NCPUS];
+#include <cpus.h>
+#include <mach/mach_types.h>
 
 #include <machine/cpu_data.h>
 
-#else /* !MACH_KERNEL_PRIVATE */
+#else  /* MACH_KERNEL_PRIVATE */
 
-extern thread_t                                        current_thread(void);
-#define get_preemption_level()                 _get_preeption_level()
-#define get_simple_lock_count()                        _get_simple_lock_count()
 #define disable_preemption()                   _disable_preemption()
 #define enable_preemption()                    _enable_preemption()
 #define enable_preemption_no_check()           _enable_preemption_no_check()
-#define mp_disable_preemption()                        _mp_disable_preemption()
-#define mp_enable_preemption()                 _mp_enable_preemption()
-#define mp_enable_preemption_no_check()                _mp_enable_preemption_no_check()
 
-#endif /* !MACH_KERNEL_PRIVATE */
+#endif /* MACH_KERNEL_PRIVATE */
+
+#endif /* __APPLE_API_PRIVATE */
+
+#ifdef __APPLE_API_UNSTABLE
+
+#if            !defined(MACH_KERNEL_PRIVATE)
+
+extern thread_t                        current_thread(void);
+
+#endif /* MACH_KERNEL_PRIVATE */
+
+#endif /* __APPLE_API_UNSTABLE */
 
 #endif /* _CPU_DATA_H_ */