summaryrefslogtreecommitdiff
path: root/thread_sync.c
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-09-17 14:30:40 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-09-17 14:30:40 +0200
commit738a089b3ac55e5bfb26f9121ee73ffcb8c4a36b (patch)
tree0fb3bb95dc74207648344e98600a43d3e67b98ae /thread_sync.c
parentc3acfcc78da84002b7dd5000bad21663f0773e2a (diff)
Rename scheduler.{mutex_lock,mutex_unlock} to {block,unblock}
* Move #kernel_sleep next to #block as it is similar
Diffstat (limited to 'thread_sync.c')
-rw-r--r--thread_sync.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/thread_sync.c b/thread_sync.c
index c0a61554c1..5b1e4f288f 100644
--- a/thread_sync.c
+++ b/thread_sync.c
@@ -30,7 +30,7 @@ sync_wakeup(struct list_head *head, long max)
list_del_init(&cur->node);
if (cur->th->scheduler != Qnil) {
- rb_scheduler_mutex_unlock(cur->th->scheduler, cur->self, rb_fiberptr_self(cur->fiber));
+ rb_scheduler_unblock(cur->th->scheduler, cur->self, rb_fiberptr_self(cur->fiber));
}
if (cur->th->status != THREAD_KILLED) {
@@ -276,7 +276,7 @@ do_mutex_lock(VALUE self, int interruptible_p)
if (scheduler != Qnil) {
list_add_tail(&mutex->waitq, &w.node);
- rb_scheduler_mutex_lock(scheduler, self);
+ rb_scheduler_block(scheduler, self);
list_del(&w.node);
@@ -401,7 +401,7 @@ rb_mutex_unlock_th(rb_mutex_t *mutex, rb_thread_t *th, rb_fiber_t *fiber)
list_del_init(&cur->node);
if (cur->th->scheduler != Qnil) {
- rb_scheduler_mutex_unlock(cur->th->scheduler, cur->self, rb_fiberptr_self(cur->fiber));
+ rb_scheduler_unblock(cur->th->scheduler, cur->self, rb_fiberptr_self(cur->fiber));
}
switch (cur->th->status) {