]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/misc_protos.h
0419d720c5cf398d6ceba1bf56b00687ee6b368e
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
29 #ifndef _MISC_PROTOS_H_
30 #define _MISC_PROTOS_H_
34 #include <machine/setjmp.h>
35 #include <mach/boolean.h>
36 #include <mach/message.h>
37 #include <mach/machine/vm_types.h>
38 #include <ipc/ipc_types.h>
40 /* Set a bit in a bit array */
45 /* Clear a bit in a bit array */
50 /* Find the first set bit in a bit array */
57 * Test if indicated bit is set in bit string.
63 /* Move arbitrarily-aligned data from one array to another */
69 /* Move overlapping, arbitrarily aligned data from one array to another */
70 /* Not present on all ports */
81 /* Zero an arbitrarily aligned array */
86 /* Move arbitrarily-aligned data from a user space to kernel space */
87 extern boolean_t
copyin(
88 const char *user_addr
,
92 /* Move a NUL-terminated string from a user space to kernel space */
93 extern boolean_t
copyinstr(
94 const char *user_addr
,
99 /* Move arbitrarily-aligned data from a user space to kernel space */
100 extern boolean_t
copyinmsg(
101 const char *user_addr
,
103 mach_msg_size_t nbytes
);
105 /* Move arbitrarily-aligned data from a kernel space to user space */
106 extern boolean_t
copyout(
107 const char *kernel_addr
,
111 /* Move arbitrarily-aligned data from a kernel space to user space */
112 extern boolean_t
copyoutmsg(
113 const char *kernel_addr
,
115 mach_msg_size_t nbytes
);
117 extern int sscanf(const char *input
, const char *fmt
, ...);
119 extern integer_t
sprintf(char *buf
, const char *fmt
, ...);
121 extern void printf(const char *format
, ...);
123 extern void dbugprintf(const char *format
, ...);
125 extern void kdp_printf(const char *format
, ...);
127 extern void printf_init(void);
129 extern void panic(const char *string
, ...);
131 extern void panic_init(void);
133 extern void log(int level
, char *fmt
, ...);
137 register const char *fmt
,
143 register const char *fmt
,
145 void (*putc
)(int, void *),
149 extern void safe_gets(
153 extern void cnputcusr(char);
155 extern void conslog_putc(char);
157 extern void consdebug_putc(char);
159 extern void cnputc(char);
161 extern int cngetc(void);
163 extern int cnmaygetc(void);
172 extern void bootstrap_create(void);
174 extern void halt_cpu(void);
176 extern void halt_all_cpus(
179 extern void Debugger(
180 const char * message
);
185 extern char *machine_boot_info(
190 * Machine-dependent routine to fill in an array with up to callstack_max
191 * levels of return pc information.
193 extern void machine_callstack(
195 vm_size_t callstack_max
);
197 extern void consider_machine_collect(void);
199 extern void norma_bootstrap(void);
202 extern boolean_t
no_bootstrap_task(void);
203 extern ipc_port_t
get_root_master_device_port(void);
206 #endif /* _MISC_PROTOS_H_ */