]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/cpu_data.h
xnu-792.6.61.tar.gz
[apple/xnu.git] / osfmk / kern / cpu_data.h
index 7ff974ca371edb4c63ca8eeba7bcc87ee1d353a3..25ea592543c93d64443237b3c59c5037c207de8b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
  * @OSF_COPYRIGHT@
  */
 
-#ifndef        _CPU_DATA_H_
-#define        _CPU_DATA_H_
+#ifdef XNU_KERNEL_PRIVATE
 
-#ifdef MACH_KERNEL_PRIVATE
-#include <cpus.h>
-#include <mach/mach_types.h>
+#ifndef        _KERN_CPU_DATA_H_
+#define        _KERN_CPU_DATA_H_
 
-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;
+#include <mach/mach_types.h>
+#include <sys/cdefs.h>
 
-extern cpu_data_t      cpu_data[NCPUS];
+#ifdef MACH_KERNEL_PRIVATE
 
 #include <machine/cpu_data.h>
 
-#else /* !MACH_KERNEL_PRIVATE */
+#endif /* MACH_KERNEL_PRIVATE */
+
+__BEGIN_DECLS
+
+extern void            _disable_preemption(void);
+extern void            _enable_preemption(void);
 
-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 /* _CPU_DATA_H_ */
+__END_DECLS
+
+#endif /* _KERN_CPU_DATA_H_ */
+
+#endif /* XNU_KERNEL_PRIVATE */