aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-20 14:24:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-20 14:24:39 +0000
commitbbc0c7289d21046bc2b7ab88f6ceae12ba8d306f (patch)
treee334c837db0fe1a9b94fc26194727f77931cbdae
parentb7b627ca45a093f3ddb32512cf7d18982cb93824 (diff)
downloadruby-bbc0c7289d21046bc2b7ab88f6ceae12ba8d306f.tar.gz
thread_pthread.c: no fork, no gvl_atfork
* thread_pthread.c (gvl_atfork): used in rb_thread_atfork_internal only if HAVE_WORKING_FORK is defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--thread_pthread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 0f62c6d603..b8be9bddc5 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -181,12 +181,14 @@ gvl_destroy(rb_vm_t *vm)
native_mutex_destroy(&vm->gvl.lock);
}
+#if defined(HAVE_WORKING_FORK)
static void
gvl_atfork(rb_vm_t *vm)
{
gvl_init(vm);
gvl_acquire(vm, GET_THREAD());
}
+#endif
#define NATIVE_MUTEX_LOCK_DEBUG 0