]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/misc_protos.h
c66b385fc7e032a28c0da52640ca7b4f03df86d3
2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
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
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
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.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
34 #ifndef _MISC_PROTOS_H_
35 #define _MISC_PROTOS_H_
39 #include <machine/setjmp.h>
40 #include <mach/boolean.h>
41 #include <mach/message.h>
42 #include <mach/machine/vm_types.h>
43 #include <ipc/ipc_types.h>
44 #include <kern/debug.h>
46 /* Set a bit in a bit array */
51 /* Clear a bit in a bit array */
56 /* Find the first set bit in a bit array */
63 * Test if indicated bit is set in bit string.
69 /* Move arbitrarily-aligned data from a user space to kernel space */
71 const user_addr_t user_addr
,
75 /* Move a NUL-terminated string from a user space to kernel space */
77 const user_addr_t user_addr
,
82 /* Move arbitrarily-aligned data from a user space to kernel space */
84 const user_addr_t user_addr
,
86 mach_msg_size_t nbytes
);
88 /* Move arbitrarily-aligned data from a kernel space to user space */
90 const char *kernel_addr
,
91 user_addr_t user_addr
,
94 /* Move arbitrarily-aligned data from a kernel space to user space */
95 extern int copyoutmsg(
96 const char *kernel_addr
,
97 user_addr_t user_addr
,
98 mach_msg_size_t nbytes
);
100 /* Invalidate copy window(s) cache */
101 extern void inval_copy_windows(thread_t
);
104 extern int sscanf(const char *input
, const char *fmt
, ...);
106 extern integer_t
sprintf(char *buf
, const char *fmt
, ...);
108 extern void printf(const char *format
, ...);
110 extern void dbugprintf(const char *format
, ...);
112 extern void kdp_printf(const char *format
, ...);
114 extern void printf_init(void);
116 extern void log(int level
, char *fmt
, ...);
120 register const char *fmt
,
126 register const char *fmt
,
128 void (*putc
)(int, void *),
132 extern void safe_gets(
136 extern void cnputcusr(char);
138 extern void conslog_putc(char);
140 extern void consdebug_putc(char);
142 extern void cnputc(char);
144 extern int cngetc(void);
146 extern int cnmaygetc(void);
155 extern void bootstrap_create(void);
157 extern void Debugger(
158 const char * message
);
164 extern void norma_bootstrap(void);
167 extern boolean_t
no_bootstrap_task(void);
168 extern ipc_port_t
get_root_master_device_port(void);
171 extern kern_return_t
kernel_set_special_port(
172 host_priv_t host_priv
,
176 #endif /* _MISC_PROTOS_H_ */