Project

General

Profile

Backport #1471 » ruby_1_8_7_thread_adjust_join.patch

Move adjust join out of wake_on into unlock_mutex_inner - JohnCarter (John Carter), 05/19/2009 02:39 PM

View differences:

bld/i686-pc-linux-gnu/src/ruby-1.8.7-p160/ruby-1.8.7-p160/ext/thread/thread.c 2009-05-18 17:33:56.697102707 +1200
return ary;
}
static void
adjust_join(const List *list, VALUE new)
{
extern void rb_thread_set_join _((VALUE, VALUE));
Entry *entry;
for (entry = list->entries; entry; entry = entry->next) {
rb_thread_set_join(entry->value, new);
}
}
static VALUE
wake_thread(VALUE thread)
{
......
}
waking = wake_one(&mutex->waiting);
if (!NIL_P(waking)) {
adjust_join(&mutex->waiting, waking);
}
mutex->owner = waking;
return waking;
(3-3/3)