diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-06-16 22:07:05 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-06-17 10:13:40 +0900 |
commit | e4f891ce8d4833fea1e1f9abd69c2896d429a948 (patch) | |
tree | 81fb457e6485236fb55ab52628fdd8af9e0fcd64 /thread_sync.c | |
parent | 4e097226370ec93bd25823d6a0dd34963619b1b9 (diff) |
Adjust styles [ci skip]
* --braces-after-func-def-line
* --dont-cuddle-else
* --procnames-start-lines
* --space-after-for
* --space-after-if
* --space-after-while
Diffstat (limited to 'thread_sync.c')
-rw-r--r-- | thread_sync.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/thread_sync.c b/thread_sync.c index 76bf57e4dd..c6183ca438 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -195,7 +195,8 @@ rb_mutex_locked_p(VALUE self) } static void -thread_mutex_insert(rb_thread_t *thread, rb_mutex_t *mutex) { +thread_mutex_insert(rb_thread_t *thread, rb_mutex_t *mutex) +{ if (thread->keeping_mutexes) { mutex->next_mutex = thread->keeping_mutexes; } @@ -204,7 +205,8 @@ thread_mutex_insert(rb_thread_t *thread, rb_mutex_t *mutex) { } static void -thread_mutex_remove(rb_thread_t *thread, rb_mutex_t *mutex) { +thread_mutex_remove(rb_thread_t *thread, rb_mutex_t *mutex) +{ rb_mutex_t **keeping_mutexes = &thread->keeping_mutexes; while (*keeping_mutexes && *keeping_mutexes != mutex) { @@ -268,7 +270,9 @@ mutex_owned_p(rb_fiber_t *fiber, rb_mutex_t *mutex) } } -static VALUE call_rb_fiber_scheduler_block(VALUE mutex) { +static VALUE +call_rb_fiber_scheduler_block(VALUE mutex) +{ return rb_fiber_scheduler_block(rb_fiber_scheduler_current(), mutex, Qnil); } |