summaryrefslogtreecommitdiff
path: root/thread_sync.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-19 00:01:03 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-19 00:01:03 +0000
commit77038f9f826dbc988332c9ec4abf7dea57af1160 (patch)
tree38ce5304472dec4d2c628081e87fc18a093238e2 /thread_sync.c
parentf6f54d776eae5e7862cc01fab4e35ff70f46c1b0 (diff)
Revert "thread_sync.c (rb_mutex_sleep): skip interrupt check before sleep"
This reverts commit 2e420b8b99db4a5b81e2deda1ca386d59ad6bcba (r64464) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_sync.c')
-rw-r--r--thread_sync.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/thread_sync.c b/thread_sync.c
index 7b1054b2ac..5e511af0db 100644
--- a/thread_sync.c
+++ b/thread_sync.c
@@ -438,7 +438,7 @@ rb_mutex_cleanup_keeping_mutexes(const rb_thread_t *current_thread)
static VALUE
rb_mutex_sleep_forever(VALUE time)
{
- sleep_forever(GET_THREAD(), SLEEP_DEADLOCKABLE|SLEEP_BEFORE_CHECK_INTS);
+ rb_thread_sleep_deadly_allow_spurious_wakeup();
return Qnil;
}
@@ -446,8 +446,7 @@ static VALUE
rb_mutex_wait_for(VALUE time)
{
struct timespec *t = (struct timespec*)time;
- /* permit spurious check */
- sleep_timespec(GET_THREAD(), *t, SLEEP_BEFORE_CHECK_INTS);
+ sleep_timespec(GET_THREAD(), *t, 0); /* permit spurious check */
return Qnil;
}