]> git.saurik.com Git - apple/libc.git/blob - mach.subproj/headers.subproj/mach.h
9fa02f36c175547dcc05731f7b59ff6f4fa9cd52
[apple/libc.git] / mach.subproj / headers.subproj / 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/mach_types.h>
60 #include <mach/mach_interface.h>
61 #include <mach/mach_port.h>
62 #include <mach/mach_init.h>
63 #include <mach/mach_host.h>
64 #include <mach/thread_switch.h>
65 /*
66 * Standard prototypes
67 */
68 extern void panic_init(mach_port_t);
69 extern void panic(const char *, ...);
70
71 extern void safe_gets(char *,
72 char *,
73 int);
74
75 extern void slot_name(cpu_type_t,
76 cpu_subtype_t,
77 char **,
78 char **);
79
80 extern void mig_reply_setup(mach_msg_header_t *,
81 mach_msg_header_t *);
82
83 extern void mach_msg_destroy(mach_msg_header_t *);
84
85 extern mach_msg_return_t mach_msg_receive(mach_msg_header_t *);
86
87 extern mach_msg_return_t mach_msg_send(mach_msg_header_t *);
88
89 extern mach_msg_return_t mach_msg_server_once(boolean_t (*)
90 (mach_msg_header_t *,
91 mach_msg_header_t *),
92 mach_msg_size_t,
93 mach_port_t,
94 mach_msg_options_t);
95 extern mach_msg_return_t mach_msg_server(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
102 #ifdef MACH_KERNEL
103 extern void *sbrk(int);
104
105 extern int brk(void *);
106
107 #endif
108 /*
109 * Prototypes for compatibility
110 */
111 extern kern_return_t clock_get_res(mach_port_t,
112 clock_res_t *);
113 extern kern_return_t clock_set_res(mach_port_t,
114 clock_res_t);
115
116 extern kern_return_t clock_sleep(mach_port_t,
117 int,
118 mach_timespec_t,
119 mach_timespec_t *);
120 #endif /* _MACH_H_ */