[前][次][番号順一覧][スレッド一覧]

ruby-changes:11666

From: nobu <ko1@a...>
Date: Tue, 28 Apr 2009 23:05:23 +0900 (JST)
Subject: [ruby-changes:11666] Ruby:r23305 (ruby_1_8): * eval.c (get_ts): use readtime clock.

nobu	2009-04-28 23:05:07 +0900 (Tue, 28 Apr 2009)

  New Revision: 23305

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23305

  Log:
    * eval.c (get_ts): use readtime clock.  [ruby-dev:38354]
    * eval.c (rb_thread_stop_timer): clear thread_init while locking.

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/eval.c

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 23304)
+++ ruby_1_8/ChangeLog	(revision 23305)
@@ -1,3 +1,9 @@
+Tue Apr 28 23:05:03 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* eval.c (get_ts): use readtime clock.  [ruby-dev:38354]
+
+	* eval.c (rb_thread_stop_timer): clear thread_init while locking.
+
 Tue Apr 28 19:10:42 2009  Kazuhiro NISHIYAMA  <zn@m...>
 
 	* test/test_timeout.rb: backported from 1.9.
Index: ruby_1_8/eval.c
===================================================================
--- ruby_1_8/eval.c	(revision 23304)
+++ ruby_1_8/eval.c	(revision 23305)
@@ -12370,8 +12370,8 @@
 {
     struct timeval tv;
 
-#ifdef CLOCK_MONOTONIC
-    if (clock_gettime(CLOCK_MONOTONIC, to) != 0)
+#ifdef CLOCK_REALTIME
+    if (clock_gettime(CLOCK_REALTIME, to) != 0)
 #endif
     {
 	gettimeofday(&tv, NULL);
@@ -12452,9 +12452,9 @@
     if (!thread_init) return;
     safe_mutex_lock(&time_thread.lock);
     pthread_cond_signal(&time_thread.cond);
+    thread_init = 0;
     pthread_cleanup_pop(1);
     pthread_join(time_thread.thread, NULL);
-    thread_init = 0;
 }
 #elif defined(HAVE_SETITIMER)
 static void

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]