]> git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/kern_types.h
xnu-123.5.tar.gz
[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 <mach/machine/vm_types.h>
32 #include <ipc/ipc_types.h>
33
34 #if !defined(MACH_KERNEL_PRIVATE)
35
36 /*
37 * Declare empty structure definitions for export to other
38 * kernel components. This lets us still provide some level
39 * of type checking, without exposing our internal data
40 * structures.
41 */
42 struct thread_shuttle ;
43 struct task ;
44 struct host ;
45 struct processor ;
46 struct processor_set ;
47 struct thread_activation ;
48 struct subsystem ;
49 struct semaphore ;
50 struct lock_set ;
51 struct ledger ;
52 struct alarm ;
53 struct clock ;
54 struct zone ;
55 struct wait_queue ;
56
57 #else /* MACH_KERNEL_PRIVATE */
58
59 #include <kern/misc_protos.h>
60 typedef struct clock *clock_t; /* Internal use only */
61
62 #endif /* MACH_KERNEL_PRIVATE */
63
64 typedef struct thread_shuttle *thread_t;
65 typedef struct thread_shuttle *thread_shuttle_t;
66 typedef struct task *task_t;
67 typedef struct host *host_t;
68 typedef struct processor *processor_t;
69 typedef struct processor_set *processor_set_t;
70 typedef struct thread_activation *thread_act_t;
71 typedef struct subsystem *subsystem_t;
72 typedef struct semaphore *semaphore_t;
73 typedef struct lock_set *lock_set_t;
74 typedef struct ledger *ledger_t;
75 typedef struct alarm *alarm_t;
76 typedef struct clock *clock_serv_t;
77 typedef struct clock *clock_ctrl_t;
78 typedef struct zone *zone_t;
79 typedef struct wait_queue *wait_queue_t;
80
81 typedef host_t host_priv_t;
82 typedef host_t host_security_t;
83 typedef processor_set_t processor_set_name_t;
84 typedef vm_offset_t ipc_kobject_t;
85
86 typedef void *event_t; /* wait event */
87 typedef void (*continuation_t)(void); /* continuation */
88
89 #define ZONE_NULL ((zone_t) 0)
90 #define IKO_NULL ((ipc_kobject_t) 0)
91 #define WAIT_QUEUE_NULL ((wait_queue_t) 0)
92 #define NO_EVENT ((event_t)0)
93
94
95 #endif /* KERNEL_PRIVATE */
96
97 #endif /* _KERN_KERN_TYPES_H_ */