[Spice-devel] [RFC 17/33] xspice: add spiceqxl_io_port, empty

Alon Levy alevy at redhat.com
Wed Apr 27 08:56:06 PDT 2011


---
 src/Makefile.am        |    1 +
 src/qxl.h              |    4 +++-
 src/spiceqxl_io_port.c |   12 ++++++++++++
 src/spiceqxl_io_port.h |    9 +++++++++
 4 files changed, 25 insertions(+), 1 deletions(-)
 create mode 100644 src/spiceqxl_io_port.c
 create mode 100644 src/spiceqxl_io_port.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 2624039..8f048c8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -59,6 +59,7 @@ spiceqxl_drv_la_LIBADD = uxa/libuxa.la
 
 spiceqxl_drv_la_SOURCES =				\
 	qxl.h					\
+	spiceqxl_io_port.c			\
 	qxl_driver.c				\
 	qxl_image.c				\
 	qxl_surface.c				\
diff --git a/src/qxl.h b/src/qxl.h
index ba2b0eb..e45066c 100644
--- a/src/qxl.h
+++ b/src/qxl.h
@@ -350,7 +350,9 @@ void *            qxl_allocnf          (qxl_screen_t           *qxl,
 					unsigned long           size);
 int		   qxl_garbage_collect (qxl_screen_t *qxl);
 
-#ifndef XSPICE
+#ifdef XSPICE
+#include "spiceqxl_io_port.h"
+#else
 #define ioport_write(qxl, port, val) outb(qxl->io_base + port, val)
 #endif
 
diff --git a/src/spiceqxl_io_port.c b/src/spiceqxl_io_port.c
new file mode 100644
index 0000000..8a2ea03
--- /dev/null
+++ b/src/spiceqxl_io_port.c
@@ -0,0 +1,12 @@
+#include <pthread.h>
+
+#include <spice.h>
+
+#include "qxl.h"
+#include "spiceqxl_io_port.h"
+
+/* called from Xorg thread - not worker thread! */
+void ioport_write(qxl_screen_t *qxl, uint32_t io_port, uint32_t val)
+{
+}
+
diff --git a/src/spiceqxl_io_port.h b/src/spiceqxl_io_port.h
new file mode 100644
index 0000000..fc461b4
--- /dev/null
+++ b/src/spiceqxl_io_port.h
@@ -0,0 +1,9 @@
+#ifndef SPICEQXL_IO_PORT_H
+#define SPICEQXL_IO_PORT_H
+
+#include "qxl.h"
+
+/* device to spice-server, now xspice to spice-server */
+void ioport_write(qxl_screen_t *qxl, uint32_t io_port, uint32_t val);
+
+#endif // SPICEQXL_IO_PORT_H
-- 
1.7.4.4



More information about the Spice-devel mailing list