X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..378393581903b274cb7a4d18e0d978071a6b592d:/osfmk/kern/cpu_data.h diff --git a/osfmk/kern/cpu_data.h b/osfmk/kern/cpu_data.h index 7ff974ca3..25ea59254 100644 --- a/osfmk/kern/cpu_data.h +++ b/osfmk/kern/cpu_data.h @@ -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@ * @@ -23,41 +23,31 @@ * @OSF_COPYRIGHT@ */ -#ifndef _CPU_DATA_H_ -#define _CPU_DATA_H_ +#ifdef XNU_KERNEL_PRIVATE -#ifdef MACH_KERNEL_PRIVATE -#include -#include +#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 +#include -extern cpu_data_t cpu_data[NCPUS]; +#ifdef MACH_KERNEL_PRIVATE #include -#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 */