]>
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 printf_init(void);
122 extern void panic(const char *string
, ...);
124 extern void panic_init(void);
126 extern void log(int level
, char *fmt
, ...);
130 register const char *fmt
,
135 extern void safe_gets(
139 extern void cnputcusr(char);
141 extern void cnputc(char);
143 extern int cngetc(void);
145 extern int cnmaygetc(void);
154 extern void bootstrap_create(void);
156 extern void halt_cpu(void);
158 extern void halt_all_cpus(
161 extern void Debugger(
162 const char * message
);
167 extern char *machine_boot_info(
172 * Machine-dependent routine to fill in an array with up to callstack_max
173 * levels of return pc information.
175 extern void machine_callstack(
177 vm_size_t callstack_max
);
179 extern void consider_machine_collect(void);
181 extern void norma_bootstrap(void);
184 extern boolean_t
no_bootstrap_task(void);
185 extern ipc_port_t
get_root_master_device_port(void);
188 #endif /* _MISC_PROTOS_H_ */