/*
- * 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
-#include <sys/appleapiopts.h>
+#ifndef _KERN_CPU_DATA_H_
+#define _KERN_CPU_DATA_H_
-#ifdef __APPLE_API_PRIVATE
-
-#ifdef MACH_KERNEL_PRIVATE
-
-#include <cpus.h>
#include <mach/mach_types.h>
+#include <sys/cdefs.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;
+#ifdef MACH_KERNEL_PRIVATE
#include <machine/cpu_data.h>
-#else /* MACH_KERNEL_PRIVATE */
-
-#define disable_preemption() _disable_preemption()
-#define enable_preemption() _enable_preemption()
-#define enable_preemption_no_check() _enable_preemption_no_check()
-
#endif /* MACH_KERNEL_PRIVATE */
-#endif /* __APPLE_API_PRIVATE */
+__BEGIN_DECLS
-#ifdef __APPLE_API_UNSTABLE
+extern void _disable_preemption(void);
+extern void _enable_preemption(void);
-#if !defined(MACH_KERNEL_PRIVATE)
+#define disable_preemption() _disable_preemption()
+#define enable_preemption() _enable_preemption()
-extern thread_t current_thread(void);
-#endif /* MACH_KERNEL_PRIVATE */
+__END_DECLS
-#endif /* __APPLE_API_UNSTABLE */
+#endif /* _KERN_CPU_DATA_H_ */
-#endif /* _CPU_DATA_H_ */
+#endif /* XNU_KERNEL_PRIVATE */