summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-06 17:50:23 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-06 17:50:23 +0000
commit604a1e2e22b1e8a841a6d3f6d0c870eb504306f3 (patch)
tree22ef2c79b5248ce92841ff30601a0a3172a37a3e
parentb2ea836ae705cc690d1230476e6eb97e92e7ef52 (diff)
downloadruby-604a1e2e22b1e8a841a6d3f6d0c870eb504306f3.tar.gz
fix win32 compile error.
* thread_win32.c (RB_CONDATTR_CLOCK_MONOTONIC): define RB_CONDATTR_CLOCK_MONOTONIC always. * thread_pthread.c (RB_CONDATTR_CLOCK_MONOTONIC): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--thread_pthread.c3
-rw-r--r--thread_win32.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5e1e788368..1057d362f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat May 7 02:49:12 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ fix win32 compile error.
+
+ * thread_win32.c (RB_CONDATTR_CLOCK_MONOTONIC): define
+ RB_CONDATTR_CLOCK_MONOTONIC always.
+ * thread_pthread.c (RB_CONDATTR_CLOCK_MONOTONIC): ditto.
+
Sat May 7 02:29:41 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
mutex: deadlock check timeout use monotonic time.
diff --git a/thread_pthread.c b/thread_pthread.c
index ba2b954388..85483c1328 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -28,9 +28,10 @@ static void native_cond_wait(rb_thread_cond_t *cond, pthread_mutex_t *mutex);
static void native_cond_initialize(rb_thread_cond_t *cond, int flags);
static void native_cond_destroy(rb_thread_cond_t *cond);
+#define RB_CONDATTR_CLOCK_MONOTONIC 1
+
#if defined(HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined(CLOCK_MONOTONIC) && defined(HAVE_CLOCK_GETTIME)
#define USE_MONOTONIC_COND 1
-#define RB_CONDATTR_CLOCK_MONOTONIC 1
#endif
#define GVL_SIMPLE_LOCK 0
diff --git a/thread_win32.c b/thread_win32.c
index 62f78fd850..0288e772a1 100644
--- a/thread_win32.c
+++ b/thread_win32.c
@@ -14,6 +14,8 @@
#include <process.h>
#define WIN32_WAIT_TIMEOUT 10 /* 10 ms */
+#define RB_CONDATTR_CLOCK_MONOTONIC 1 /* no effect */
+
#undef Sleep
#define native_thread_yield() Sleep(0)