Xen Test Framework
console.h
Go to the documentation of this file.
1 #ifndef XTF_CONSOLE_H
2 #define XTF_CONSOLE_H
3 
4 #include <xtf/libc.h>
5 #include <xtf/compiler.h>
6 
7 #include <xen/event_channel.h>
8 #include <xen/io/console.h>
9 
10 /* Console output callback. */
11 typedef void (*cons_output_cb)(const char *buf, size_t len);
12 
13 /*
14  * Register a console callback. Several callbacks can be registered for usful
15  * destinations of console text.
16  */
18 
19 /*
20  * Initialise the PV console. Will register a callback.
21  */
23  evtchn_port_t port);
24 
25 void vprintk(const char *fmt, va_list args) __printf(1, 0);
26 void printk(const char *fmt, ...) __printf(1, 2);
27 
28 size_t pv_console_read_some(char *buf, size_t len);
29 
30 #endif /* XTF_CONSOLE_H */
31 
32 /*
33  * Local variables:
34  * mode: C
35  * c-file-style: "BSD"
36  * c-basic-offset: 4
37  * tab-width: 4
38  * indent-tabs-mode: nil
39  * End:
40  */
void register_console_callback(cons_output_cb cb)
Definition: console.c:24
void init_pv_console(xencons_interface_t *ring, evtchn_port_t port)
Definition: console.c:109
uint32_t evtchn_port_t
Definition: event_channel.h:11
void printk(const char *fmt,...)
Definition: console.c:134
void(* cons_output_cb)(const char *buf, size_t len)
Definition: console.h:11
size_t pv_console_read_some(char *buf, size_t len)
Definition: console.c:55
#define __printf(f, v)
Definition: compiler.h:12
void vprintk(const char *fmt, va_list args)
Definition: console.c:119
__builtin_va_list va_list
Definition: stdarg.h:9