From d2afeb9445a3dc8445fa48f601a78c5ecd743ca6 Mon Sep 17 00:00:00 2001 From: normal Date: Sun, 19 Aug 2018 00:01:08 +0000 Subject: thread_pthread.c: reset timeslice delay when uncontended This matches the behavior of old timer thread more closely and seems to fix [Bug #14999] when limited to a single CPU. I cannot reproduce the error on a multi-core system unless I use schedtool to force affinity to a single CPU: schedtool -a 0x01 -e make test-spec \ MSPECOPT='-R1000 spec/ruby/library/conditionvariable/wait_spec.rb' While it may be good enough to pass the spec, I don't have huge degree of confidence in the interrupt handling robustness under extremely heavy load (these may be ancient bugs, though). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.h | 1 + 1 file changed, 1 insertion(+) (limited to 'thread_pthread.h') diff --git a/thread_pthread.h b/thread_pthread.h index 8fb1d521b6..c64018bb13 100644 --- a/thread_pthread.h +++ b/thread_pthread.h @@ -53,6 +53,7 @@ typedef struct rb_global_vm_lock_struct { /* slow path */ struct list_head waitq; const struct rb_thread_struct *timer; + int timer_err; /* yield */ rb_nativethread_cond_t switch_cond; -- cgit v1.2.1