summaryrefslogtreecommitdiff
path: root/thread_sync.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-31 06:39:01 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-31 06:39:01 +0000
commit6897b3b9854eb54afd6898830e9935ce68a276de (patch)
tree189f27fbe919929848ea82df12b756d72ddece79 /thread_sync.c
parent919a9d9e02e5f1dcb10ae10e9deb68aba11a4660 (diff)
define rb_thread_sleep_deadly_allow_spurious_wakeup().
* thread.c, thread_sync.c: define new function rb_thread_sleep_deadly_allow_spurious_wakeup() and use it instead of using sleep_forever() directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_sync.c')
-rw-r--r--thread_sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_sync.c b/thread_sync.c
index 9fbe3b0383..ce280cea1a 100644
--- a/thread_sync.c
+++ b/thread_sync.c
@@ -420,7 +420,7 @@ rb_mutex_abandon_all(rb_mutex_t *mutexes)
static VALUE
rb_mutex_sleep_forever(VALUE time)
{
- sleep_forever(GET_THREAD(), TRUE, FALSE); /* permit spurious check */
+ rb_thread_sleep_deadly_allow_spurious_wakeup();
return Qnil;
}