summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
diff options
context:
space:
mode:
authorBenjamin Close <Benjamin.Close@clearchain.com>2009-02-24 20:51:10 -0800
committerBrian Paul <brianp@vmware.com>2009-02-25 07:56:43 -0700
commitdbab39c6caacb974062ac574b365254412aea412 (patch)
tree78503019f2b6c4095fc14160f133551ddc999d74 /src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
parentafe139f629251f38afd5b477d5b00f47d17da60f (diff)
gallium: Add support for BSD operating systems, tested with FreeBSD
BSD supports pipe in the same way as linux hence options which are safe for linux are also safe for BSD. Define PIPE_OS_BSD in include/pipe/p_config.h and adjust the defines to make use of it. Also define MAP_ANONYMOUS for BSD systems which use MAP_ANON Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
index 556f26c0f0..533c0a15f3 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
@@ -36,7 +36,7 @@
#include "pipe/p_config.h"
-#if defined(PIPE_OS_LINUX)
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD)
#include <unistd.h>
#include <sched.h>
#endif
@@ -559,7 +559,7 @@ fenced_buffer_list_destroy(struct fenced_buffer_list *fenced_list)
/* Wait on outstanding fences */
while (fenced_list->numDelayed) {
pipe_mutex_unlock(fenced_list->mutex);
-#if defined(PIPE_OS_LINUX)
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD)
sched_yield();
#endif
_fenced_buffer_list_check_free(fenced_list, 1);