зеркало из https://github.com/github/ruby.git
* thread_pthread.c (thread_timer): initializes mutex each time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
df6ea23faf
Коммит
3899005d2e
|
@ -1,3 +1,7 @@
|
|||
Fri Nov 7 22:42:23 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* thread_pthread.c (thread_timer): initializes mutex each time.
|
||||
|
||||
Fri Nov 7 21:23:02 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* thread_win32.c (thread_start_func_1): use already gotten stack info.
|
||||
|
|
|
@ -669,8 +669,9 @@ static void *
|
|||
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()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче