ruby-changes:8598
From: nobu <ko1@a...>
Date: Fri, 7 Nov 2008 22:42:53 +0900 (JST)
Subject: [ruby-changes:8598] Ruby:r20133 (trunk): * thread_pthread.c (thread_timer): initializes mutex each time.
nobu 2008-11-07 22:42:36 +0900 (Fri, 07 Nov 2008) New Revision: 20133 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20133 Log: * thread_pthread.c (thread_timer): initializes mutex each time. Modified files: trunk/ChangeLog trunk/thread_pthread.c Index: ChangeLog =================================================================== --- ChangeLog (revision 20132) +++ ChangeLog (revision 20133) @@ -1,3 +1,7 @@ +Fri Nov 7 22:42:23 2008 Nobuyoshi Nakada <nobu@r...> + + * thread_pthread.c (thread_timer): initializes mutex each time. + Fri Nov 7 21:23:02 2008 Nobuyoshi Nakada <nobu@r...> * thread_win32.c (thread_start_func_1): use already gotten stack info. Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 20132) +++ thread_pthread.c (revision 20133) @@ -669,8 +669,9 @@ thread_timer(void *dummy) { struct timespec ts; - static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t lock; + pthread_mutex_initializer(&lock, 0); pthread_mutex_lock(&lock); #define WAIT_FOR_10MS() (pthread_cond_timedwait(&timer_thread_cond, &lock, get_ts(&ts, PER_NANO/100)) == ETIMEDOUT) while (WAIT_FOR_10MS()) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/