/* condition var .. w/ global lock */
-static pthread_cond_t buffer_cond;
+static pthread_cond_t thread_cond;
static struct thread_state primary_thread;
thread_schedule ();
if (next_thread != current_thread->pthread_id)
- pthread_cond_broadcast (&buffer_cond);
+ pthread_cond_broadcast (&thread_cond);
if (!wait)
return;
pthread_mutex_lock (&global_lock);
while (current_thread->pthread_id != next_thread)
- pthread_cond_wait (&buffer_cond, &global_lock);
+ pthread_cond_wait (&thread_cond, &global_lock);
}
static void
*iter = (*iter)->next_thread;
thread_schedule ();
- pthread_cond_broadcast (&buffer_cond);
+ pthread_cond_broadcast (&thread_cond);
xfree (self->m_specpdl);
current_thread->blocked = 0;
pthread_mutex_lock (&global_lock);
- pthread_cond_broadcast (&buffer_cond);
+ pthread_cond_broadcast (&thread_cond);
while (current_thread->pthread_id != next_thread)
- pthread_cond_wait (&buffer_cond, &global_lock);
+ pthread_cond_wait (&thread_cond, &global_lock);
return ret;
}
init_threads (void)
{
pthread_mutex_init (&global_lock, NULL);
- pthread_cond_init (&buffer_cond, NULL);
+ pthread_cond_init (&thread_cond, NULL);
pthread_mutex_lock (&global_lock);
primary_thread.pthread_id = pthread_self ();