]> git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/kern_types.h
8d0ab03d2975f588f4778a5e42b28fb2298148bc
[apple/xnu.git] / osfmk / kern / kern_types.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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.
11 *
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
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /*
23 * @OSF_COPYRIGHT@
24 */
25
26 #ifndef _KERN_KERN_TYPES_H_
27 #define _KERN_KERN_TYPES_H_
28
29 #ifdef KERNEL_PRIVATE
30
31 #include <stdint.h>
32
33 #include <mach/machine/vm_types.h>
34 #include <ipc/ipc_types.h>
35
36 #if !defined(MACH_KERNEL_PRIVATE)
37
38 /*
39 * Declare empty structure definitions for export to other
40 * kernel components. This lets us still provide some level
41 * of type checking, without exposing our internal data
42 * structures.
43 */
44 struct thread_shuttle ;
45 struct task ;
46 struct host ;
47 struct processor ;
48 struct processor_set ;
49 struct thread_activation ;
50 struct subsystem ;
51 struct semaphore ;
52 struct lock_set ;
53 struct ledger ;
54 struct alarm ;
55 struct clock ;
56 struct zone ;
57 struct wait_queue_sub ;
58 struct wait_queue_link;
59
60 #else /* MACH_KERNEL_PRIVATE */
61
62 #include <kern/misc_protos.h>
63 typedef struct clock *clock_t; /* Internal use only */
64
65 #endif /* MACH_KERNEL_PRIVATE */
66
67 typedef struct mig_object *mig_object_t;
68 typedef struct mig_notify *mig_notify_t;
69 typedef struct thread_shuttle *thread_t;
70 typedef struct thread_shuttle *thread_shuttle_t;
71 typedef struct task *task_t;
72 typedef struct host *host_t;
73 typedef struct processor *processor_t;
74 typedef struct processor_set *processor_set_t;
75 typedef struct thread_activation *thread_act_t;
76 typedef struct subsystem *subsystem_t;
77 typedef struct semaphore *semaphore_t;
78 typedef struct lock_set *lock_set_t;
79 typedef struct ledger *ledger_t;
80 typedef struct alarm *alarm_t;
81 typedef struct clock *clock_serv_t;
82 typedef struct clock *clock_ctrl_t;
83 typedef struct zone *zone_t;
84 typedef struct wait_queue *wait_queue_t;
85 typedef struct wait_queue_sub *wait_queue_sub_t;
86 typedef struct wait_queue_link *wait_queue_link_t;
87
88 typedef host_t host_priv_t;
89 typedef host_t host_security_t;
90 typedef processor_set_t processor_set_name_t;
91 typedef vm_offset_t ipc_kobject_t;
92
93 typedef void *event_t; /* wait event */
94 typedef void (*continuation_t)(void); /* continuation */
95
96 #define ZONE_NULL ((zone_t) 0)
97
98 #define NO_EVENT ((event_t) 0)
99 #define WAIT_QUEUE_NULL ((wait_queue_t) 0)
100
101 #define IKO_NULL ((ipc_kobject_t) 0)
102 #define MIG_OBJECT_NULL ((mig_object_t) 0)
103 #define MIG_NOTIFY_NULL ((mig_notify_t) 0)
104
105 #endif /* KERNEL_PRIVATE */
106
107 #endif /* _KERN_KERN_TYPES_H_ */