From 37230939c6ebebac1ee9ce0f3de66a9a22355ab0 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Fri, 13 Jan 2012 17:15:42 +0200 Subject: build fixes: sched_yield and missing declaration From: Adam Jackson --- src/qxl_driver.c | 2 ++ src/qxl_ring.c | 3 ++- 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 #include #include +#include #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 +#include #include @@ -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; } -- cgit v1.2.3