os, rbug: remove PIPE_THREAD_HAVE_CONDVAR
authornobled <nobled@dreamwidth.org>
Sat, 3 Jul 2010 20:49:31 +0000 (13:49 -0700)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 12 Jul 2010 14:40:33 +0000 (15:40 +0100)
The new default implementation of pipe_condvar makes it
unnecessary.

src/gallium/auxiliary/os/os_thread.h
src/gallium/drivers/rbug/rbug_context.c
src/gallium/drivers/rbug/rbug_core.c

index c23ae806b91f6a5ef3e5701abdaa6f0c8c2a1666..036f6bafd5210b70bd08dbd550d38e41182ba5b7 100644 (file)
@@ -45,7 +45,6 @@
 #include <pthread.h> /* POSIX threads headers */
 #include <stdio.h> /* for perror() */
 
-#define PIPE_THREAD_HAVE_CONDVAR
 
 /* pipe_thread
  */
index 00b167e256c4c6f657efb6de22ee46dc56ae9189..e0dd5cf8c2b17a226a229b233e40279ace9ff8b0 100644 (file)
@@ -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
    }
 
 }
index f1aab3869b5c24a0bb47c6cd0a3e65bc0a47fa1b..9dc663b079a0c6787b2739073aee4f11da354cd5 100644 (file)
@@ -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);