ruby-changes:5943
From: mame <ko1@a...>
Date: Fri, 20 Jun 2008 03:03:01 +0900 (JST)
Subject: [ruby-changes:5943] Ruby:r17451 (trunk): * thread.c: try to remove false positive of deadlock detection (second
mame 2008-06-20 03:02:40 +0900 (Fri, 20 Jun 2008) New Revision: 17451 Modified files: trunk/ChangeLog trunk/thread.c Log: * thread.c: try to remove false positive of deadlock detection (second trial). http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17451&r2=17450&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread.c?r1=17451&r2=17450&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 17450) +++ ChangeLog (revision 17451) @@ -1,3 +1,8 @@ +Fri Jun 20 03:01:59 2008 Yusuke Endoh <mame@t...> + + * thread.c: try to remove false positive of deadlock detection (second + trial). + Fri Jun 20 02:16:43 2008 Yukihiro Matsumoto <matz@r...> * lib/mathn.rb (Rational::power2): typo fixed. [ruby-core:17293] Index: thread.c =================================================================== --- thread.c (revision 17450) +++ thread.c (revision 17451) @@ -2123,6 +2123,7 @@ st_foreach(vm->living_threads, terminate_atfork_i, (st_data_t)th); st_clear(vm->living_threads); st_insert(vm->living_threads, thval, (st_data_t) th->thread_id); + vm->sleeper = 0; } static int @@ -2149,6 +2150,7 @@ st_foreach(vm->living_threads, terminate_atfork_before_exec_i, (st_data_t)th); st_clear(vm->living_threads); st_insert(vm->living_threads, thval, (st_data_t) th->thread_id); + vm->sleeper = 0; } struct thgroup { @@ -2513,6 +2515,7 @@ th->transition_for_lock = 1; native_mutex_unlock(&mutex->lock); + if (interrupted == 2) native_thread_yield(); #if 0 /* for debug */ native_thread_yield(); #endif @@ -2573,7 +2576,6 @@ th->locking_mutex = Qfalse; if (mutex->th && interrupted == 2) { rb_check_deadlock(th->vm); - RUBY_VM_SET_TIMER_INTERRUPT(th); } if (th->status == THREAD_STOPPED_FOREVER) { th->status = prev_status; @@ -2671,7 +2673,7 @@ rb_obj_classname(mutexes), (void*)mutexes); */ mutexes = mutex->next_mutex; err = mutex_unlock(mutex); - if (err) rb_bug("invalid keeping_mutexes"); + if (err) rb_bug("invalid keeping_mutexes: %s", err); } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/