summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-04-27 18:04:50 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-04-27 18:04:50 +1000
commit0cca90cea1dbe1a76dbf9ac1985c3676ec460b0a (patch)
tree6e496a5d77d13a9f1679006c3c5334e0b8d889f4 /src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
parent7342688286cc3b7c938af2dfeac22df4fa8c8464 (diff)
parenta8e39b6f5a1fedf2f8719e1adb8802ebbfc09688 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
index 27032b0c4c..d3c1ec4fbe 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
@@ -34,6 +34,12 @@
*/
+#include "pipe/p_config.h"
+
+#if defined(PIPE_OS_LINUX)
+#include <unistd.h>
+#endif
+
#include "pipe/p_compiler.h"
#include "pipe/p_error.h"
#include "pipe/p_debug.h"
@@ -45,9 +51,6 @@
#include "pb_buffer.h"
#include "pb_buffer_fenced.h"
-#ifndef WIN32
-#include <unistd.h>
-#endif
/**
@@ -425,7 +428,7 @@ fenced_buffer_list_destroy(struct fenced_buffer_list *fenced_list)
/* Wait on outstanding fences */
while (fenced_list->numDelayed) {
_glthread_UNLOCK_MUTEX(fenced_list->mutex);
-#ifndef WIN32
+#if defined(PIPE_OS_LINUX)
sched_yield();
#endif
_fenced_buffer_list_check_free(fenced_list, 1);