]> git.saurik.com Git - apple/libc.git/blob - mach/headers/mach.h
d37344e412e442d594bd8e566a0e0074b79e53e7
[apple/libc.git] / mach / headers / mach.h
1 /*
2 * Copyright (c) 1999 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 * Mach Operating System
24 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
25 * All Rights Reserved.
26 *
27 * Permission to use, copy, modify and distribute this software and its
28 * documentation is hereby granted, provided that both the copyright
29 * notice and this permission notice appear in all copies of the
30 * software, derivative works or modified versions, and any portions
31 * thereof, and that both notices appear in supporting documentation.
32 *
33 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
34 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
35 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
36 *
37 * Carnegie Mellon requests users of this software to return to
38 *
39 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
40 * School of Computer Science
41 * Carnegie Mellon University
42 * Pittsburgh PA 15213-3890
43 *
44 * any improvements or extensions that they make and grant Carnegie Mellon
45 * the rights to redistribute these changes.
46 */
47
48 /*
49 * Includes all the types that a normal user
50 * of Mach programs should need
51 */
52
53 #ifndef _MACH_H_
54 #define _MACH_H_
55
56 #define __MACH30__
57 #define MACH_IPC_FLAVOR UNTYPED
58
59 #include <mach/std_types.h>
60 #include <mach/mach_types.h>
61 #include <mach/mach_interface.h>
62 #include <mach/mach_port.h>
63 #include <mach/mach_init.h>
64 #include <mach/mach_host.h>
65 #include <mach/thread_switch.h>
66
67 #include <mach/rpc.h> /* for compatibility only */
68 #include <mach/mig.h>
69 #include <mach/mig_errors.h>
70
71 /*
72 * Standard prototypes
73 */
74 extern void panic_init(mach_port_t);
75 extern void panic(const char *, ...);
76
77 extern void safe_gets(char *,
78 char *,
79 int);
80
81 extern void slot_name(cpu_type_t,
82 cpu_subtype_t,
83 char **,
84 char **);
85
86 extern void mig_reply_setup(mach_msg_header_t *,
87 mach_msg_header_t *);
88
89 extern void mach_msg_destroy(mach_msg_header_t *);
90
91 extern mach_msg_return_t mach_msg_receive(mach_msg_header_t *);
92
93 extern mach_msg_return_t mach_msg_send(mach_msg_header_t *);
94
95 extern mach_msg_return_t mach_msg_server_once(boolean_t (*)
96 (mach_msg_header_t *,
97 mach_msg_header_t *),
98 mach_msg_size_t,
99 mach_port_t,
100 mach_msg_options_t);
101 extern mach_msg_return_t mach_msg_server(boolean_t (*)
102 (mach_msg_header_t *,
103 mach_msg_header_t *),
104 mach_msg_size_t,
105 mach_port_t,
106 mach_msg_options_t);
107
108 #ifdef MACH_KERNEL
109 extern void *sbrk(int);
110
111 extern int brk(void *);
112
113 #endif
114 /*
115 * Prototypes for compatibility
116 */
117 extern kern_return_t clock_get_res(mach_port_t,
118 clock_res_t *);
119 extern kern_return_t clock_set_res(mach_port_t,
120 clock_res_t);
121
122 extern kern_return_t clock_sleep(mach_port_t,
123 int,
124 mach_timespec_t,
125 mach_timespec_t *);
126 #endif /* _MACH_H_ */