diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-25 07:56:42 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-25 07:56:42 +0000 |
commit | 63f39fcb4045f98888b24494b77317d70a8398e0 (patch) | |
tree | 46f2c37ad0fd78b7701bbd346a4f6cf85642d172 /thread_pthread.c | |
parent | 7c885222ca1d038006819afda93758cf1425ec66 (diff) | |
download | ruby-63f39fcb4045f98888b24494b77317d70a8398e0.tar.gz |
* random.c (random_rand): remove unused variables.
* struct.c (rb_struct_define_without_accessor): ditto.
* strftime.c (rb_strftime_with_timespec): ditto.
* sprintf.c: ditto.
* time.c (time_asctime): remove useless GetTimeval().
* thread_pthread.c: cast to (void *) for %p.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index ad6f716a3f..f60da8ab7e 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -43,7 +43,7 @@ gvl_show_waiting_threads(rb_vm_t *vm) rb_thread_t *th = vm->gvl.waiting_threads; int i = 0; while (th) { - fprintf(stderr, "waiting (%d): %p\n", i++, th); + fprintf(stderr, "waiting (%d): %p\n", i++, (void *)th); th = th->native_thread_data.gvl_next; } } @@ -82,7 +82,7 @@ gvl_acquire(rb_vm_t *vm, rb_thread_t *th) #else native_mutex_lock(&vm->gvl.lock); if (vm->gvl.waiting > 0 || vm->gvl.acquired != 0) { - if (GVL_DEBUG) fprintf(stderr, "gvl acquire (%p): sleep\n", th); + if (GVL_DEBUG) fprintf(stderr, "gvl acquire (%p): sleep\n", (void *)th); gvl_waiting_push(vm, th); if (GVL_DEBUG) gvl_show_waiting_threads(vm); @@ -98,7 +98,7 @@ gvl_acquire(rb_vm_t *vm, rb_thread_t *th) native_mutex_unlock(&vm->gvl.lock); #endif if (GVL_DEBUG) gvl_show_waiting_threads(vm); - if (GVL_DEBUG) fprintf(stderr, "gvl acquire (%p): acquire\n", th); + if (GVL_DEBUG) fprintf(stderr, "gvl acquire (%p): acquire\n", (void *)th); } static void @@ -110,11 +110,11 @@ gvl_release(rb_vm_t *vm) native_mutex_lock(&vm->gvl.lock); if (vm->gvl.waiting > 0) { rb_thread_t *th = vm->gvl.waiting_threads; - if (GVL_DEBUG) fprintf(stderr, "gvl release (%p): wakeup: %p\n", GET_THREAD(), th); + if (GVL_DEBUG) fprintf(stderr, "gvl release (%p): wakeup: %p\n", (void *)GET_THREAD(), (void *)th); native_cond_signal(&th->native_thread_data.gvl_cond); } else { - if (GVL_DEBUG) fprintf(stderr, "gvl release (%p): wakeup: %p\n", GET_THREAD(), NULL); + if (GVL_DEBUG) fprintf(stderr, "gvl release (%p): wakeup: %p\n", (void *)GET_THREAD(), NULL); /* do nothing */ } vm->gvl.acquired = 0; @@ -163,7 +163,7 @@ mutex_debug(const char *msg, pthread_mutex_t *lock) static pthread_mutex_t dbglock = PTHREAD_MUTEX_INITIALIZER; if ((r = pthread_mutex_lock(&dbglock)) != 0) {exit(1);} - fprintf(stdout, "%s: %p\n", msg, lock); + fprintf(stdout, "%s: %p\n", msg, (void *)lock); if ((r = pthread_mutex_unlock(&dbglock)) != 0) {exit(1);} } } |