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

ruby-changes:9761

From: yugui <ko1@a...>
Date: Sun, 4 Jan 2009 15:15:33 +0900 (JST)
Subject: [ruby-changes:9761] Ruby:r21302 (ruby_1_9_1): merges r21265 from trunk into ruby_1_9_1.

yugui	2009-01-04 15:15:14 +0900 (Sun, 04 Jan 2009)

  New Revision: 21302

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

  Log:
    merges r21265 from trunk into ruby_1_9_1.
    * signal.c (rb_signal_buff_size): defined for check whether signal
      is in the buffer or not.
    * thread_pthread.c (thread_timer): don't exit the loop when signal
      is in the buffer. [ruby-dev:37637]

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/signal.c
    branches/ruby_1_9_1/thread_pthread.c

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 21301)
+++ ruby_1_9_1/ChangeLog	(revision 21302)
@@ -1,3 +1,11 @@
+Fri Jan  2 06:43:58 2009  NARUSE, Yui  <naruse@r...>
+
+	* signal.c (rb_signal_buff_size): defined for check whether signal
+	  is in the buffer or not.
+
+	* thread_pthread.c (thread_timer): don't exit the loop when signal
+	  is in the buffer. [ruby-dev:37637]
+
 Thu Jan  1 22:27:55 2009  Yuki Sonoda (Yugui)  <yugui@y...>
 
 	* spec/default.mspec: fix for builddir != srcdir
@@ -712,11 +720,11 @@
 
 Wed Dec 24 20:15:50 2008  Koichi Sasada  <ko1@a...>
 
-        * tool/file2lastrev.rb (get_revisions): fix to ignore end of line.
+	* tool/file2lastrev.rb (get_revisions): fix to ignore end of line.
 
 Tue Dec 23 15:48:55 2008  NAKAMURA Usaku  <usa@r...>
 
-        * tool/file2lastrev.rb: shouldn't use single quote in shell's command
+	* tool/file2lastrev.rb: shouldn't use single quote in shell's command
 	  line if you want to support Windows.
 
 Tue Dec 23 15:36:58 2008  Yuki Sonoda (Yugui)  <yugui@y...>
@@ -1248,7 +1256,7 @@
 
 	* test/ruby/test_m17n_comb.rb: feature changed in r20626.
 	  follows it.
- 
+
 Sat Dec 13 12:48:57 2008  Yuki Sonoda (Yugui)  <yugui@y...>
 
 	* test/ruby/test_m17n.rb: feature changed in r20626.
@@ -2514,7 +2522,7 @@
 Wed Oct 29 23:57:29 2008  Yusuke Endoh  <mame@t...>
 
 	* array.c (rb_ary_sort_bang): replacing array during sort broke
-          invariant of array.  [ruby-dev:36983]
+	invariant of array.  [ruby-dev:36983]
 
 Wed Oct 29 21:06:46 2008  Yukihiro Matsumoto  <matz@r...>
 
Index: ruby_1_9_1/thread_pthread.c
===================================================================
--- ruby_1_9_1/thread_pthread.c	(revision 21301)
+++ ruby_1_9_1/thread_pthread.c	(revision 21302)
@@ -741,19 +741,24 @@
     return ts;
 }
 
+int rb_signal_buff_size(void);
+
 static void *
 thread_timer(void *dummy)
 {
     struct timespec ts;
-    int err;
 
     native_mutex_lock(&timer_thread_lock);
     native_cond_broadcast(&timer_thread_cond);
 #define WAIT_FOR_10MS() native_cond_timedwait(&timer_thread_cond, &timer_thread_lock, get_ts(&ts, PER_NANO/100))
-    while (system_working > 0 && (err = WAIT_FOR_10MS()) != 0 && err != EINTR) {
-	if (err != ETIMEDOUT) {
-	    rb_bug("thread_timer/timedwait: %d", err);
+    while (system_working > 0) {
+	int err = WAIT_FOR_10MS();
+	if (err == ETIMEDOUT);
+	else if (err == 0 || err == EINTR) {
+	    if (rb_signal_buff_size() == 0) break;
 	}
+	else rb_bug("thread_timer/timedwait: %d", err);
+
 #ifndef __CYGWIN__
 	if (signal_thread_list_anchor.next) {
 	    FGLOCK(&signal_thread_list_lock, {
Index: ruby_1_9_1/signal.c
===================================================================
--- ruby_1_9_1/signal.c	(revision 21301)
+++ ruby_1_9_1/signal.c	(revision 21302)
@@ -514,6 +514,12 @@
 #endif
 }
 
+int
+rb_signal_buff_size()
+{
+    return signal_buff.size;
+}
+
 #if USE_TRAP_MASK
 # ifdef HAVE_SIGPROCMASK
 static sigset_t trap_last_mask;

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

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