From 6924066a65f923a61f31bdc910b57ca9606715b0 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 10 May 2017 00:39:26 +0000 Subject: adjust styles [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_sync.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'thread_sync.c') diff --git a/thread_sync.c b/thread_sync.c index bfd625d001..e40e8c2ea8 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -298,7 +298,8 @@ rb_mutex_unlock_th(rb_mutex_t *mutex, rb_thread_t volatile *th) } else if (mutex->th != th) { err = "Attempt to unlock a mutex which is locked by another thread"; - } else { + } + else { struct mutex_waiter *cur = 0, *next = 0; rb_mutex_t *volatile *th_mutex = &th->keeping_mutexes; @@ -306,19 +307,19 @@ rb_mutex_unlock_th(rb_mutex_t *mutex, rb_thread_t volatile *th) list_for_each_safe(&mutex->waitq, cur, next, node) { list_del_init(&cur->node); switch (cur->th->status) { - case THREAD_RUNNABLE: /* from someone else calling Thread#run */ - case THREAD_STOPPED_FOREVER: /* likely (rb_mutex_lock) */ + case THREAD_RUNNABLE: /* from someone else calling Thread#run */ + case THREAD_STOPPED_FOREVER: /* likely (rb_mutex_lock) */ rb_threadptr_interrupt(cur->th); goto found; - case THREAD_STOPPED: /* probably impossible */ + case THREAD_STOPPED: /* probably impossible */ rb_bug("unexpected THREAD_STOPPED"); - case THREAD_KILLED: + case THREAD_KILLED: /* not sure about this, possible in exit GC? */ rb_bug("unexpected THREAD_KILLED"); continue; } } -found: + found: while (*th_mutex != mutex) { th_mutex = &(*th_mutex)->next_mutex; } -- cgit v1.2.3