diff options
author | Michal Krol <michal@tungstengraphics.com> | 2008-01-20 19:36:23 +0100 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-01-26 10:52:01 +0900 |
commit | 6c3d12e374939d36a23af7c9c502de18ce02f423 (patch) | |
tree | 6123abc8348d0ef4a489b5929861267fe4cef5d9 /src/mesa/pipe/pipebuffer/pb_buffer_fenced.c | |
parent | 7411a84c2bd6f4dd4f027c6c6a647822cbb4c061 (diff) |
gallium: Fix build for WinXP.
Diffstat (limited to 'src/mesa/pipe/pipebuffer/pb_buffer_fenced.c')
-rw-r--r-- | src/mesa/pipe/pipebuffer/pb_buffer_fenced.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c b/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c index 625120d714..ad2da71c4a 100644 --- a/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c +++ b/src/mesa/pipe/pipebuffer/pb_buffer_fenced.c @@ -36,17 +36,21 @@ #include <assert.h> #include <stdlib.h> -#include <unistd.h> -#include "main/imports.h" -#include "glapi/glthread.h" #include "linked_list.h" +#include "p_compiler.h" #include "p_winsys.h" +#include "p_thread.h" #include "pb_buffer.h" #include "pb_buffer_fenced.h" +#ifndef __MSC__ +#include <unistd.h> +#include "main/imports.h" +#endif + /** * Convenience macro (type safe). @@ -103,11 +107,12 @@ _fenced_buffer_list_check_free(struct fenced_buffer_list *fenced_list, struct fenced_buffer *fenced_buf; struct list_head *list, *prev; int signaled = -1; - int i; list = fenced_list->delayed.next; if (fenced_list->numDelayed > 3) { + unsigned i; + for (i = 0; i < fenced_list->numDelayed; i += 3) { list = list->next; } @@ -281,7 +286,7 @@ fenced_buffer_list_destroy(struct fenced_buffer_list *fenced_list) while (fenced_list->numDelayed) { _glthread_UNLOCK_MUTEX(fenced_list->mutex); sched_yield(); - _fenced_buffer_list_check_free(fenced_list, GL_TRUE); + _fenced_buffer_list_check_free(fenced_list, 1); _glthread_LOCK_MUTEX(fenced_list->mutex); } |