summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-28 05:48:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-28 05:48:31 +0000
commit925da00b022b05b5bf70e5d757b9149493e6946c (patch)
tree078dfc039745fe700b2477d9564303339fc4c64f /thread_pthread.c
parent079545cd8c7a2c0da45977bec7d88aa3d1232820 (diff)
* thread_pthread.c (gvl_release, gvl_init): suppress warnings.
* vm_core.h (rb_vm_gvl_destroy): add prototype. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 9966943f8e..8a10d3a217 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -29,7 +29,7 @@ static void native_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
static void native_cond_initialize(pthread_cond_t *cond);
static void native_cond_destroy(pthread_cond_t *cond);
-static void native_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void));
+static void native_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void));
#define native_mutex_reinitialize_atfork(lock) (\
native_mutex_unlock(lock), \
@@ -50,6 +50,7 @@ gvl_show_waiting_threads(rb_vm_t *vm)
}
}
+#if !GVL_SIMPLE_LOCK
static void
gvl_waiting_push(rb_vm_t *vm, rb_thread_t *th)
{
@@ -73,6 +74,7 @@ gvl_waiting_shift(rb_vm_t *vm, rb_thread_t *th)
vm->gvl.waiting_threads = vm->gvl.waiting_threads->native_thread_data.gvl_next;
vm->gvl.waiting--;
}
+#endif
static void
gvl_acquire(rb_vm_t *vm, rb_thread_t *th)
@@ -114,7 +116,7 @@ gvl_release(rb_vm_t *vm)
native_cond_signal(&th->native_thread_data.gvl_cond);
}
else {
- if (GVL_DEBUG) fprintf(stderr, "gvl release (%p): wakeup: %p\n", GET_THREAD(), 0);
+ if (GVL_DEBUG) fprintf(stderr, "gvl release (%p): wakeup: %p\n", GET_THREAD(), NULL);
/* do nothing */
}
vm->gvl.acquired = 0;