[Mesa-dev] [PATCH 4/5] os, rbug: remove PIPE_THREAD_HAVE_CONDVAR
nobled
nobled at dreamwidth.org
Sat Jul 3 13:49:31 PDT 2010
The new default implementation of pipe_condvar makes it
unnecessary.
---
src/gallium/auxiliary/os/os_thread.h | 1 -
src/gallium/drivers/rbug/rbug_context.c | 8 --------
src/gallium/drivers/rbug/rbug_core.c | 6 ------
3 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/src/gallium/auxiliary/os/os_thread.h
b/src/gallium/auxiliary/os/os_thread.h
index c23ae80..036f6ba 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -45,7 +45,6 @@
#include <pthread.h> /* POSIX threads headers */
#include <stdio.h> /* for perror() */
-#define PIPE_THREAD_HAVE_CONDVAR
/* pipe_thread
*/
diff --git a/src/gallium/drivers/rbug/rbug_context.c
b/src/gallium/drivers/rbug/rbug_context.c
index 00b167e..e0dd5cf 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -97,15 +97,7 @@ rbug_draw_block_locked(struct rbug_context
*rb_pipe, int flag)
/* wait for rbug to clear the blocked flag */
while (rb_pipe->draw_blocked & flag) {
rb_pipe->draw_blocked |= flag;
-#ifdef PIPE_THREAD_HAVE_CONDVAR
pipe_condvar_wait(rb_pipe->draw_cond, rb_pipe->draw_mutex);
-#else
- pipe_mutex_unlock(rb_pipe->draw_mutex);
-#ifdef PIPE_SUBSYSTEM_WINDOWS_USER
- Sleep(1);
-#endif
- pipe_mutex_lock(rb_pipe->draw_mutex);
-#endif
}
}
diff --git a/src/gallium/drivers/rbug/rbug_core.c
b/src/gallium/drivers/rbug/rbug_core.c
index f1aab38..9dc663b 100644
--- a/src/gallium/drivers/rbug/rbug_core.c
+++ b/src/gallium/drivers/rbug/rbug_core.c
@@ -407,9 +407,7 @@ rbug_context_draw_step(struct rbug_rbug *tr_rbug,
struct rbug_header *header, ui
}
pipe_mutex_unlock(rb_context->draw_mutex);
-#ifdef PIPE_THREAD_HAVE_CONDVAR
pipe_condvar_broadcast(rb_context->draw_cond);
-#endif
pipe_mutex_unlock(rb_screen->list_mutex);
@@ -442,9 +440,7 @@ rbug_context_draw_unblock(struct rbug_rbug
*tr_rbug, struct rbug_header *header,
rb_context->draw_blocker &= ~unblock->unblock;
pipe_mutex_unlock(rb_context->draw_mutex);
-#ifdef PIPE_THREAD_HAVE_CONDVAR
pipe_condvar_broadcast(rb_context->draw_cond);
-#endif
pipe_mutex_unlock(rb_screen->list_mutex);
@@ -476,9 +472,7 @@ rbug_context_draw_rule(struct rbug_rbug *tr_rbug,
struct rbug_header *header, ui
rb_context->draw_blocker |= RBUG_BLOCK_RULE;
pipe_mutex_unlock(rb_context->draw_mutex);
-#ifdef PIPE_THREAD_HAVE_CONDVAR
pipe_condvar_broadcast(rb_context->draw_cond);
-#endif
pipe_mutex_unlock(rb_screen->list_mutex);
--
1.5.4.3
More information about the mesa-dev
mailing list