diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-13 21:34:20 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-13 21:34:20 +0000 |
commit | 48b6bd74e2febde095ac85d818e94c0e58677647 (patch) | |
tree | 73348a2cf6a66b1f1d6620b93109b7f7dfb0ca03 /signal.c | |
parent | 4d2e0fffb08f0418fa6995be2e15aad7ee11b048 (diff) |
thread_pthread.c: eliminate timer thread by restructuring GVL
This reverts commit 194a6a2c68e9c8a3536b24db18ceac87535a6051 (r64203).
Race conditions which caused the original reversion will be fixed
in the subsequent commit.
[ruby-core:88360] [Misc #14937]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -709,9 +709,6 @@ signal_enque(int sig) static rb_atomic_t sigchld_hit; -/* Prevent compiler from reordering access */ -#define ACCESS_ONCE(type,x) (*((volatile type *)&(x))) - static RETSIGTYPE sighandler(int sig) { @@ -730,7 +727,7 @@ sighandler(int sig) else { signal_enque(sig); } - rb_thread_wakeup_timer_thread(); + rb_thread_wakeup_timer_thread(sig); #if !defined(BSD_SIGNAL) && !defined(POSIX_SIGNAL) ruby_signal(sig, sighandler); #endif @@ -764,7 +761,6 @@ rb_enable_interrupt(void) #ifdef HAVE_PTHREAD_SIGMASK sigset_t mask; sigemptyset(&mask); - sigaddset(&mask, RUBY_SIGCHLD); /* timer-thread handles this */ pthread_sigmask(SIG_SETMASK, &mask, NULL); #endif } @@ -1077,7 +1073,6 @@ rb_trap_exit(void) void ruby_waitpid_all(rb_vm_t *); /* process.c */ -/* only runs in the timer-thread */ void ruby_sigchld_handler(rb_vm_t *vm) { |