]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/misc_protos.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
26 #ifndef _MISC_PROTOS_H_
27 #define _MISC_PROTOS_H_
31 #include <machine/setjmp.h>
32 #include <mach/boolean.h>
33 #include <mach/message.h>
34 #include <mach/machine/vm_types.h>
35 #include <ipc/ipc_types.h>
37 /* Set a bit in a bit array */
42 /* Clear a bit in a bit array */
47 /* Find the first set bit in a bit array */
54 * Test if indicated bit is set in bit string.
60 /* Move arbitrarily-aligned data from one array to another */
66 /* Move overlapping, arbitrarily aligned data from one array to another */
67 /* Not present on all ports */
78 /* Zero an arbitrarily aligned array */
83 /* Move arbitrarily-aligned data from a user space to kernel space */
84 extern boolean_t
copyin(
85 const char *user_addr
,
89 /* Move a NUL-terminated string from a user space to kernel space */
90 extern boolean_t
copyinstr(
91 const char *user_addr
,
96 /* Move arbitrarily-aligned data from a user space to kernel space */
97 extern boolean_t
copyinmsg(
98 const char *user_addr
,
100 mach_msg_size_t nbytes
);
102 /* Move arbitrarily-aligned data from a kernel space to user space */
103 extern boolean_t
copyout(
104 const char *kernel_addr
,
108 /* Move arbitrarily-aligned data from a kernel space to user space */
109 extern boolean_t
copyoutmsg(
110 const char *kernel_addr
,
112 mach_msg_size_t nbytes
);
114 extern int sscanf(const char *input
, const char *fmt
, ...);
116 extern integer_t
sprintf(char *buf
, const char *fmt
, ...);
118 extern void printf(const char *format
, ...);
120 extern void kdp_printf(const char *format
, ...);
122 extern void printf_init(void);
124 extern void panic(const char *string
, ...);
126 extern void panic_init(void);
128 extern void log(int level
, char *fmt
, ...);
132 register const char *fmt
,
138 register const char *fmt
,
140 void (*putc
)(int, void *),
144 extern void safe_gets(
148 extern void cnputcusr(char);
150 extern void conslog_putc(char);
152 extern void consdebug_putc(char);
154 extern void cnputc(char);
156 extern int cngetc(void);
158 extern int cnmaygetc(void);
167 extern void bootstrap_create(void);
169 extern void halt_cpu(void);
171 extern void halt_all_cpus(
174 extern void Debugger(
175 const char * message
);
180 extern char *machine_boot_info(
185 * Machine-dependent routine to fill in an array with up to callstack_max
186 * levels of return pc information.
188 extern void machine_callstack(
190 vm_size_t callstack_max
);
192 extern void consider_machine_collect(void);
194 extern void norma_bootstrap(void);
197 extern boolean_t
no_bootstrap_task(void);
198 extern ipc_port_t
get_root_master_device_port(void);
201 #endif /* _MISC_PROTOS_H_ */