]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - sys/dev/xen/console/xencons_ring.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / sys / dev / xen / console / xencons_ring.h
1 /*
2  * $FreeBSD$
3  *
4  */
5 #ifndef _XENCONS_RING_H
6 #define _XENCONS_RING_H
7
8 #define CN_LOCK(l)                                                                      \
9                 do {                                                                                    \
10                                 if (panicstr == NULL)                                   \
11                         mtx_lock_spin(&(l));                    \
12                 } while (0)
13 #define CN_UNLOCK(l)                                                            \
14                 do {                                                                                    \
15                                 if (panicstr == NULL)                                   \
16                         mtx_unlock_spin(&(l));                  \
17                 } while (0)
18
19 int xencons_ring_init(void);
20 int xencons_ring_send(const char *data, unsigned len);
21 void xencons_rx(char *buf, unsigned len);
22 void xencons_tx(void);
23
24
25 typedef void (xencons_receiver_func)(char *buf, unsigned len);
26 void xencons_ring_register_receiver(xencons_receiver_func *f);
27
28 void xencons_handle_input(void *unused);
29 int xencons_has_input(void);
30
31 #endif /* _XENCONS_RING_H */