]> git.saurik.com Git - apple/xnu.git/blame - osfmk/ipc/ipc_types.h
xnu-344.tar.gz
[apple/xnu.git] / osfmk / ipc / ipc_types.h
CommitLineData
1c79356b 1/*
9bccf70c 2 * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved.
1c79356b
A
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 * 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.
30 */
31#ifndef _IPC_TYPES_H_
32#define _IPC_TYPES_H_
33
9bccf70c
A
34#include <mach/port.h>
35#include <mach/message.h>
36#include <mach/mach_types.h>
1c79356b
A
37
38#if !defined(MACH_KERNEL_PRIVATE)
39
40/*
41 * For kernel code that resides outside of mach
42 * we define empty structs so that everything will
43 * remain strongly typed, without giving out
44 * implementation details.
45 */
46struct ipc_object ;
1c79356b
A
47
48#endif /* !MACH_KERNEL_PRIVATE */
49
50typedef struct ipc_object *ipc_object_t;
1c79356b
A
51
52#define IPC_OBJECT_NULL ((ipc_object_t) 0)
53#define IPC_OBJECT_DEAD ((ipc_object_t)~0)
54#define IPC_OBJECT_VALID(io) (((io) != IPC_OBJECT_NULL) && \
55 ((io) != IPC_OBJECT_DEAD))
56
9bccf70c 57typedef void (*mach_msg_continue_t)(mach_msg_return_t); /* after wakeup */
1c79356b
A
58
59#endif /* _IPC_TYPES_H_ */