diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-20 14:24:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-20 14:24:39 +0000 |
commit | a716a2474b71d4290763986cfd5f1cde0ccb5080 (patch) | |
tree | e334c837db0fe1a9b94fc26194727f77931cbdae /thread_pthread.c | |
parent | 8a775968586a1d3f1a3520ffe0b49989d59d3ae4 (diff) | |
download | ruby-a716a2474b71d4290763986cfd5f1cde0ccb5080.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
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 2 |
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 |