2 * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 * Machine independent per processor data.
27 #ifndef _KERN_PROCESSOR_DATA_H_
28 #define _KERN_PROCESSOR_DATA_H_
31 * #include kern/processor.h instead of this file.
34 #ifdef MACH_KERNEL_PRIVATE
36 #include <ipc/ipc_kmsg.h>
37 #include <kern/timer.h>
39 struct processor_data
{
40 /* Processor state statistics */
41 integer_t cpu_ticks
[CPU_STATE_MAX
];
44 /* Current execution timer */
45 timer_t current_timer
;
46 timer_data_t offline_timer
;
47 #endif /* STAT_TIME */
49 /* Kernel stack cache */
55 /* Pending timer callouts */
56 queue_head_t timer_call_queue
;
58 /* VM event counters */
59 vm_statistics_data_t vm_stat
;
61 /* IPC free message cache */
64 ipc_kmsg_t entries
[IKM_STASH
];
71 typedef struct processor_data processor_data_t
;
73 #define PROCESSOR_DATA(processor, member) \
74 (processor)->processor_data.member
76 extern void processor_data_init(
77 processor_t processor
);
79 #endif /* MACH_KERNEL_PRIVATE */
81 #endif /* _KERN_PROCESSOR_DATA_H_ */