debuggers.hg

view extras/mini-os/include/console.h @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children 5c0bf00e371d
line source
1 /*
2 ****************************************************************************
3 * (C) 2006 - Grzegorz Milos - Cambridge University
4 ****************************************************************************
5 *
6 * File: console.h
7 * Author: Grzegorz Milos
8 * Changes:
9 *
10 * Date: Mar 2006
11 *
12 * Environment: Xen Minimal OS
13 * Description: Console interface.
14 *
15 * Handles console I/O. Defines printk.
16 *
17 ****************************************************************************
18 * Permission is hereby granted, free of charge, to any person obtaining a copy
19 * of this software and associated documentation files (the "Software"), to
20 * deal in the Software without restriction, including without limitation the
21 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
22 * sell copies of the Software, and to permit persons to whom the Software is
23 * furnished to do so, subject to the following conditions:
24 *
25 * The above copyright notice and this permission notice shall be included in
26 * all copies or substantial portions of the Software.
27 *
28 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
33 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
34 * DEALINGS IN THE SOFTWARE.
35 */
36 #ifndef _LIB_CONSOLE_H_
37 #define _LIB_CONSOLE_H_
39 #include<os.h>
40 #include<traps.h>
41 #include<stdarg.h>
43 void print(int direct, const char *fmt, va_list args);
44 void printk(const char *fmt, ...);
45 void xprintk(const char *fmt, ...);
47 #define tprintk(_fmt, _args...) printk("[%s] " _fmt, current->name, ##_args)
49 void xencons_rx(char *buf, unsigned len, struct pt_regs *regs);
50 void xencons_tx(void);
52 void init_console(void);
53 void console_print(char *data, int length);
55 #endif /* _LIB_CONSOLE_H_ */