2 * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 * Machine independent per processor data.
26 #ifndef _KERN_PROCESSOR_DATA_H_
27 #define _KERN_PROCESSOR_DATA_H_
30 * #include kern/processor.h instead of this file.
33 #ifdef MACH_KERNEL_PRIVATE
35 #include <ipc/ipc_kmsg.h>
36 #include <kern/timer.h>
38 struct processor_data
{
39 /* Processor state statistics */
40 integer_t cpu_ticks
[CPU_STATE_MAX
];
43 /* Current execution timer */
44 timer_t current_timer
;
45 timer_data_t offline_timer
;
46 #endif /* STAT_TIME */
48 /* Kernel stack cache */
54 /* Pending timer callouts */
55 queue_head_t timer_call_queue
;
57 /* VM event counters */
58 vm_statistics_data_t vm_stat
;
60 /* IPC free message cache */
63 ipc_kmsg_t entries
[IKM_STASH
];
70 typedef struct processor_data processor_data_t
;
72 #define PROCESSOR_DATA(processor, member) \
73 (processor)->processor_data.member
75 extern void processor_data_init(
76 processor_t processor
);
78 #endif /* MACH_KERNEL_PRIVATE */
80 #endif /* _KERN_PROCESSOR_DATA_H_ */