FreeBSD/Linux Kernel Cross Reference
sys/kern/kern_io.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1993 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: kern_io.h,v $
29 * Revision 2.2 93/11/17 19:07:02 dbg
30 * Created.
31 * [93/11/17 19:06:24 dbg]
32 *
33 */
34
35 /*
36 * Kernel console IO package.
37 */
38
39 #ifndef _KERN_IO_H
40 #define _KERN_IO_H_
41
42 #include <mach/boolean.h>
43 #include <sys/stdarg.h>
44
45 /*
46 * Kernel printing routines.
47 * _doprnt is used by debugger printing as well
48 * as kernel printing routines.
49 */
50 extern void
51 printf_init(void);
52
53 extern void
54 _doprnt(const char *fmt,
55 va_list *argp,
56 void (*putc)(char, void *),
57 int radix,
58 void *arg);
59
60 extern void
61 printf(const char *format, ...);
62
63 extern int
64 sprintf(char *buf, const char *fmt, ...);
65
66 /*
67 * Kernel input routines.
68 */
69 extern int
70 sscanf(const char *input, const char *fmt, ...);
71
72 extern void
73 safe_gets(char *buf, int maxlen);
74
75 /*
76 * Machine-dependent console IO routines.
77 * These do one-character-at-a-time output and
78 * polled input.
79 */
80
81 extern void
82 cnputc(int); /* output character */
83
84 extern int
85 cngetc(void); /* input character, waiting */
86
87 extern int
88 cnmaygetc(void); /* input character, return -1 if none */
89
90 extern void
91 cnpollc(boolean_t); /* switch console to polled mode for
92 cngetc */
93
94 #endif /* _KERN_IO_H_ */
Cache object: 5fa2d3056db8416738927bea8758f4b4
|