diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-12 01:30:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-12 01:30:48 +0000 |
commit | 1fe38a5caee8985c0e2d6eb05894fad3c9476d6d (patch) | |
tree | 01708f0fb5b6d68593999f79ff886045af80597e /thread.c | |
parent | 0fcf8e17aaea1b5562a89c3aed24c2e722b38a66 (diff) | |
download | ruby-1fe38a5caee8985c0e2d6eb05894fad3c9476d6d.tar.gz |
* thread.c (thread_join): pthread_t may not be pointer.
* thread_pthread.ci (ubf_select_each): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -389,7 +389,7 @@ thread_join(rb_thread_t *target_th, double delay) rb_thread_t *th = GET_THREAD(); double now, limit = timeofday() + delay; - thread_debug("thread_join (thid: %p)\n", target_th->thread_id); + thread_debug("thread_join (thid: %p)\n", (void*)target_th->thread_id); if (target_th->status != THREAD_KILLED) { th->join_list_next = target_th->join_list_head; @@ -404,17 +404,17 @@ thread_join(rb_thread_t *target_th, double delay) now = timeofday(); if (now > limit) { thread_debug("thread_join: timeout (thid: %p)\n", - target_th->thread_id); + (void*)target_th->thread_id); return Qnil; } sleep_wait_for_interrupt(th, limit - now); } thread_debug("thread_join: interrupted (thid: %p)\n", - target_th->thread_id); + (void*)target_th->thread_id); } thread_debug("thread_join: success (thid: %p)\n", - target_th->thread_id); + (void*)target_th->thread_id); if (target_th->errinfo != Qnil) { VALUE err = target_th->errinfo; @@ -2349,7 +2349,7 @@ thlist_signal(rb_thread_list_t **list, unsigned int maxth) int woken = 0; rb_thread_list_t *q; - while (q = *list) { + while ((q = *list) != 0) { rb_thread_t *th = q->th; *list = q->next; |