aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/xen/console/xencons_ring.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/xen/console/xencons_ring.h')
-rw-r--r--sys/dev/xen/console/xencons_ring.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/xen/console/xencons_ring.h b/sys/dev/xen/console/xencons_ring.h
index fc97d95028e2..7e3a64c9f6ff 100644
--- a/sys/dev/xen/console/xencons_ring.h
+++ b/sys/dev/xen/console/xencons_ring.h
@@ -5,6 +5,17 @@
#ifndef _XENCONS_RING_H
#define _XENCONS_RING_H
+#define CN_LOCK(l) \
+ do { \
+ if (panicstr == NULL) \
+ mtx_lock_spin(&(l)); \
+ } while (0)
+#define CN_UNLOCK(l) \
+ do { \
+ if (panicstr == NULL) \
+ mtx_unlock_spin(&(l)); \
+ } while (0)
+
int xencons_ring_init(void);
int xencons_ring_send(const char *data, unsigned len);
void xencons_rx(char *buf, unsigned len);