]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/misc_protos.h
2 * Copyright (c) 2000-2004 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>
36 #include <kern/debug.h>
38 /* Set a bit in a bit array */
43 /* Clear a bit in a bit array */
48 /* Find the first set bit in a bit array */
55 * Test if indicated bit is set in bit string.
61 /* Move arbitrarily-aligned data from a user space to kernel space */
63 const user_addr_t user_addr
,
67 /* Move a NUL-terminated string from a user space to kernel space */
69 const user_addr_t user_addr
,
74 /* Move arbitrarily-aligned data from a user space to kernel space */
76 const user_addr_t user_addr
,
78 mach_msg_size_t nbytes
);
80 /* Move arbitrarily-aligned data from a kernel space to user space */
82 const char *kernel_addr
,
83 user_addr_t user_addr
,
86 /* Move arbitrarily-aligned data from a kernel space to user space */
87 extern int copyoutmsg(
88 const char *kernel_addr
,
89 user_addr_t user_addr
,
90 mach_msg_size_t nbytes
);
92 extern int sscanf(const char *input
, const char *fmt
, ...);
94 extern integer_t
sprintf(char *buf
, const char *fmt
, ...);
96 extern void printf(const char *format
, ...);
98 extern void dbugprintf(const char *format
, ...);
100 extern void kdp_printf(const char *format
, ...);
102 extern void printf_init(void);
104 extern void log(int level
, char *fmt
, ...);
108 register const char *fmt
,
114 register const char *fmt
,
116 void (*putc
)(int, void *),
120 extern void safe_gets(
124 extern void cnputcusr(char);
126 extern void conslog_putc(char);
128 extern void consdebug_putc(char);
130 extern void cnputc(char);
132 extern int cngetc(void);
134 extern int cnmaygetc(void);
143 extern void bootstrap_create(void);
145 extern void Debugger(
146 const char * message
);
152 extern void norma_bootstrap(void);
155 extern boolean_t
no_bootstrap_task(void);
156 extern ipc_port_t
get_root_master_device_port(void);
159 extern kern_return_t
kernel_set_special_port(
160 host_priv_t host_priv
,
164 #endif /* _MISC_PROTOS_H_ */