]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/ipc/ipc_types.h
2 * Copyright (c) 2000 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@
26 * Define Basic IPC types available to callers.
27 * These are not intended to be used directly, but
28 * are used to define other types available through
29 * port.h and mach_types.h for in-kernel entities.
36 #if !defined(MACH_KERNEL_PRIVATE)
39 * For kernel code that resides outside of mach
40 * we define empty structs so that everything will
41 * remain strongly typed, without giving out
42 * implementation details.
48 #endif /* !MACH_KERNEL_PRIVATE */
50 typedef struct ipc_object
*ipc_object_t
;
51 typedef struct ipc_space
*ipc_space_t
;
52 typedef struct ipc_port
*ipc_port_t
;
54 #define IPC_OBJECT_NULL ((ipc_object_t) 0)
55 #define IPC_OBJECT_DEAD ((ipc_object_t)~0)
56 #define IPC_OBJECT_VALID(io) (((io) != IPC_OBJECT_NULL) && \
57 ((io) != IPC_OBJECT_DEAD))
59 #define IPC_PORT_NULL ((ipc_port_t) 0)
60 #define IPC_PORT_DEAD ((ipc_port_t)~0)
61 #define IPC_PORT_VALID(port) (((port) != IPC_PORT_NULL) && \
62 ((port) != IPC_PORT_DEAD))
64 #define IPC_SPACE_NULL ((ipc_space_t) 0)
66 #endif /* KERNEL_PRIVATE */
68 #endif /* _IPC_TYPES_H_ */