summaryrefslogtreecommitdiff
path: root/thread_pthread.ci
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-20 10:47:53 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-20 10:47:53 +0000
commit3453b2bd0e186788bb81deff5d723cf48e10881f (patch)
tree329d42bdbd0d45463caf6b6f3c67c9443f9153be /thread_pthread.ci
parentd481323b9211cc0823fba407253d0432fa7f1734 (diff)
* gc.h, vm_core.h: decl of rb_gc_save_machine_context()
should be at vm_core.h. * include/ruby/ruby.h, intern.h: remove type rb_thread_t. * include/ruby/intern.h: change rb_unblock_function_t, rb_unblock_function_t. * file.c, process.c: apply above changes. * thread.c, thread_pthread.ci, thread_win32.ci: ditto. * io.c: support blocking open (2). [ruby-core:13614] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.ci')
-rw-r--r--thread_pthread.ci9
1 files changed, 7 insertions, 2 deletions
diff --git a/thread_pthread.ci b/thread_pthread.ci
index 3874a46bd6..6004d4aa35 100644
--- a/thread_pthread.ci
+++ b/thread_pthread.ci
@@ -346,8 +346,9 @@ native_thread_apply_priority(rb_thread_t *th)
}
static void
-ubf_pthread_cond_signal(rb_thread_t *th, void *ptr)
+ubf_pthread_cond_signal(void *ptr)
{
+ rb_thread_t *th = (rb_thread_t *)ptr;
thread_debug("ubf_pthread_cond_signal (%p)\n", th);
pthread_cond_signal(&th->native_thread_data.sleep_cond);
}
@@ -363,8 +364,9 @@ ubf_select_each(rb_thread_t *th)
}
static void
-ubf_select(rb_thread_t *th, void *ptr)
+ubf_select(void *ptr)
{
+ rb_thread_t *th = (rb_thread_t *)ptr;
add_signal_thread_list(th);
ubf_select_each(th);
}
@@ -403,6 +405,8 @@ native_sleep(rb_thread_t *th, struct timeval *tv)
}
else {
th->unblock_function = ubf_pthread_cond_signal;
+ th->unblock_function_arg = th;
+
if (tv == 0) {
thread_debug("native_sleep: pthread_cond_wait start\n");
pthread_cond_wait(&th->native_thread_data.sleep_cond,
@@ -418,6 +422,7 @@ native_sleep(rb_thread_t *th, struct timeval *tv)
thread_debug("native_sleep: pthread_cond_timedwait end (%d)\n", r);
}
th->unblock_function = 0;
+ th->unblock_function_arg = 0;
}
pthread_mutex_unlock(&th->interrupt_lock);