summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-06 22:43:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-06 22:43:30 +0000
commit1df6dc2a17c9041cfbf6a1c827f7b34793954594 (patch)
treeb546c16d6cbf6e407d61cec8411ddfc4e151a345
parent5cd42d40d30143be26129c2f1b1622da6b919dda (diff)
downloadruby-1df6dc2a17c9041cfbf6a1c827f7b34793954594.tar.gz
ruby-1df6dc2a17c9041cfbf6a1c827f7b34793954594.tar.xz
ruby-1df6dc2a17c9041cfbf6a1c827f7b34793954594.zip
* thread.c (thread_timer): pthread_cond_timedwait returns ETIMEDOUT
when timed out. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--thread_pthread.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 759f73456..dee206d22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Nov 7 07:43:27 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * thread.c (thread_timer): pthread_cond_timedwait returns ETIMEDOUT
+ when timed out.
+
Fri Nov 7 07:32:55 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/yaml/rubytypes.rb: support Rational and Complex as 1.8
diff --git a/thread_pthread.c b/thread_pthread.c
index d7d1eb52f..e73879119 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -672,7 +672,7 @@ thread_timer(void *dummy)
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_lock(&lock);
-#define WAIT_FOR_10MS() (pthread_cond_timedwait(&timer_thread_cond, &lock, get_ts(&ts, PER_NANO/100)) == 0)
+#define WAIT_FOR_10MS() (pthread_cond_timedwait(&timer_thread_cond, &lock, get_ts(&ts, PER_NANO/100)) == ETIMEDOUT)
while (WAIT_FOR_10MS()) {
#ifndef __CYGWIN__
if (signal_thread_list_anchor.next) {