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

ruby-changes:25417

From: kosaki <ko1@a...>
Date: Mon, 5 Nov 2012 11:46:55 +0900 (JST)
Subject: [ruby-changes:25417] kosaki:r37474 (trunk): * thread_pthread.c (native_thread_init, native_thread_destroy):

kosaki	2012-11-05 11:46:41 +0900 (Mon, 05 Nov 2012)

  New Revision: 37474

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

  Log:
    * thread_pthread.c (native_thread_init, native_thread_destroy):
      removed HAVE_PTHREAD_CONDATTR_INIT check because this silly
      #ifdef makes use-uninitialized-var issue and (2) native_cond_initialize()
      already have a right platform and caller don't need any additional care.
      [Bug #6825]

  Modified files:
    trunk/ChangeLog
    trunk/thread_pthread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37473)
+++ ChangeLog	(revision 37474)
@@ -1,3 +1,11 @@
+Mon Nov  5 11:35:11 2012  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* thread_pthread.c (native_thread_init, native_thread_destroy):
+	  removed HAVE_PTHREAD_CONDATTR_INIT check because this silly
+	  #ifdef makes use-uninitialized-var issue and (2) native_cond_initialize()
+	  already have a right platform and caller don't need any additional care.
+	  [Bug #6825]
+
 Mon Nov  5 10:57:59 2012  NARUSE, Yui  <naruse@r...>
 
 	* lib/cgi/core.rb: check if Tempfile is defined before use it.
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 37473)
+++ thread_pthread.c	(revision 37474)
@@ -466,18 +466,14 @@
 static void
 native_thread_init(rb_thread_t *th)
 {
-#ifdef HAVE_PTHREAD_CONDATTR_INIT
     native_cond_initialize(&th->native_thread_data.sleep_cond, RB_CONDATTR_CLOCK_MONOTONIC);
-#endif
     ruby_thread_set_native(th);
 }
 
 static void
 native_thread_destroy(rb_thread_t *th)
 {
-#ifdef HAVE_PTHREAD_CONDATTR_INIT
     native_cond_destroy(&th->native_thread_data.sleep_cond);
-#endif
 }
 
 #ifndef USE_THREAD_CACHE

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

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