]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
91447636 | 2 | * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. |
1c79356b | 3 | * |
8ad349bb | 4 | * @APPLE_LICENSE_OSREFERENCE_HEADER_START@ |
1c79356b | 5 | * |
8ad349bb A |
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. The rights granted to you under the | |
10 | * License may not be used to create, or enable the creation or | |
11 | * redistribution of, unlawful or unlicensed copies of an Apple operating | |
12 | * system, or to circumvent, violate, or enable the circumvention or | |
13 | * violation of, any terms of an Apple operating system software license | |
14 | * agreement. | |
15 | * | |
16 | * Please obtain a copy of the License at | |
17 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
18 | * file. | |
19 | * | |
20 | * The Original Code and all software distributed under the License are | |
21 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
22 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
23 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
24 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
25 | * Please see the License for the specific language governing rights and | |
26 | * limitations under the License. | |
27 | * | |
28 | * @APPLE_LICENSE_OSREFERENCE_HEADER_END@ | |
1c79356b A |
29 | */ |
30 | /* | |
31 | * @OSF_COPYRIGHT@ | |
32 | */ | |
91447636 | 33 | |
1c79356b A |
34 | /* |
35 | * Define Basic IPC types available to callers. | |
36 | * These are not intended to be used directly, but | |
37 | * are used to define other types available through | |
38 | * port.h and mach_types.h for in-kernel entities. | |
39 | */ | |
91447636 A |
40 | |
41 | #ifndef _IPC_IPC_TYPES_H_ | |
42 | #define _IPC_IPC_TYPES_H_ | |
1c79356b | 43 | |
9bccf70c A |
44 | #include <mach/port.h> |
45 | #include <mach/message.h> | |
46 | #include <mach/mach_types.h> | |
1c79356b | 47 | |
91447636 A |
48 | #ifdef MACH_KERNEL_PRIVATE |
49 | ||
50 | typedef natural_t ipc_table_index_t; /* index into tables */ | |
51 | typedef natural_t ipc_table_elems_t; /* size of tables */ | |
52 | typedef natural_t ipc_entry_bits_t; | |
53 | typedef ipc_table_elems_t ipc_entry_num_t; /* number of entries */ | |
54 | typedef ipc_table_index_t ipc_port_request_index_t; | |
55 | ||
56 | typedef mach_port_name_t mach_port_index_t; /* index values */ | |
57 | typedef mach_port_name_t mach_port_gen_t; /* generation numbers */ | |
58 | ||
59 | typedef struct ipc_entry *ipc_entry_t; | |
60 | typedef struct ipc_tree_entry *ipc_tree_entry_t; | |
61 | typedef struct ipc_table_size *ipc_table_size_t; | |
62 | typedef struct ipc_port_request *ipc_port_request_t; | |
63 | typedef struct ipc_pset *ipc_pset_t; | |
64 | typedef struct ipc_kmsg *ipc_kmsg_t; | |
65 | ||
66 | #define IE_NULL ((ipc_entry_t) 0) | |
67 | #define ITE_NULL ((ipc_tree_entry_t) 0) | |
68 | #define ITS_NULL ((ipc_table_size_t) 0) | |
69 | #define ITS_SIZE_NONE ((ipc_table_elems_t) -1) | |
70 | #define IPR_NULL ((ipc_port_request_t) 0) | |
71 | #define IPS_NULL ((ipc_pset_t) 0) | |
72 | #define IKM_NULL ((ipc_kmsg_t) 0) | |
73 | ||
74 | typedef void (*mach_msg_continue_t)(mach_msg_return_t); /* after wakeup */ | |
75 | ||
76 | #else /* MACH_KERNEL_PRIVATE */ | |
1c79356b | 77 | |
1c79356b | 78 | struct ipc_object ; |
1c79356b | 79 | |
91447636 | 80 | #endif /* MACH_KERNEL_PRIVATE */ |
1c79356b A |
81 | |
82 | typedef struct ipc_object *ipc_object_t; | |
1c79356b A |
83 | |
84 | #define IPC_OBJECT_NULL ((ipc_object_t) 0) | |
85 | #define IPC_OBJECT_DEAD ((ipc_object_t)~0) | |
86 | #define IPC_OBJECT_VALID(io) (((io) != IPC_OBJECT_NULL) && \ | |
87 | ((io) != IPC_OBJECT_DEAD)) | |
88 | ||
91447636 | 89 | #endif /* _IPC_IPC_TYPES_H_ */ |