Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 604a1e2e22b1e8a841a6d3f6d0c870eb504306f3 1 parent b2ea836
@kosaki kosaki authored
Showing with 11 additions and 1 deletion.
  1. +7 −0 ChangeLog
  2. +2 −1  thread_pthread.c
  3. +2 −0  thread_win32.c
View
7 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.
View
3  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
View
2  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)
Please sign in to comment.
Something went wrong with that request. Please try again.