diff options
author | Alon Levy <alevy@redhat.com> | 2012-01-13 17:15:42 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-01-18 20:22:19 +0200 |
commit | 37230939c6ebebac1ee9ce0f3de66a9a22355ab0 (patch) | |
tree | 9e0378f3c9bdae3eb575c887059b1e6cbb4edf7d | |
parent | c02da3f529513fc42afce9185e41852b8ae1407a (diff) |
build fixes: sched_yield and missing declaration
From: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | src/qxl_driver.c | 2 | ||||
-rw-r--r-- | src/qxl_ring.c | 3 | ||||
-rw-r--r-- | src/spiceqxl_io_port.c | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/qxl_driver.c b/src/qxl_driver.c index a30cc9c..e3cf82f 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -46,6 +46,8 @@ #include "spiceqxl_spice_server.h" #endif /* XSPICE */ +extern void compat_init_scrn(ScrnInfoPtr); + #if 0 #define CHECK_POINT() ErrorF ("%s: %d (%s)\n", __FILE__, __LINE__, __FUNCTION__); #endif diff --git a/src/qxl_ring.c b/src/qxl_ring.c index 02c4c35..7af6f63 100644 --- a/src/qxl_ring.c +++ b/src/qxl_ring.c @@ -26,6 +26,7 @@ #include <string.h> #include <unistd.h> #include <stdlib.h> +#include <sched.h> #include "qxl.h" struct ring @@ -78,7 +79,7 @@ qxl_ring_push (struct qxl_ring *ring, #ifdef XSPICE /* in gtkperf, circles, this is a major bottleneck. Can't be that good in a vm either * Adding the yield reduces cpu usage, but doesn't improve throughput. */ - pthread_yield(); + sched_yield(); #endif mem_barrier(); } diff --git a/src/spiceqxl_io_port.c b/src/spiceqxl_io_port.c index 386cab7..bdb52bf 100644 --- a/src/spiceqxl_io_port.c +++ b/src/spiceqxl_io_port.c @@ -21,6 +21,7 @@ */ #include <pthread.h> +#include <sched.h> #include <spice.h> @@ -230,7 +231,7 @@ void ioport_write(qxl_screen_t *qxl, uint32_t io_port, uint32_t val) if (!SPICE_RING_IS_EMPTY(&header->release_ring)) { break; } - pthread_yield(); + sched_yield(); if (!SPICE_RING_IS_EMPTY(&header->release_ring)) { break; } |