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

ruby-changes:19439

From: kosaki <ko1@a...>
Date: Sun, 8 May 2011 17:52:31 +0900 (JST)
Subject: [ruby-changes:19439] Ruby:r31479 (trunk): revert r31474. we cann't call xmalloc under FGLOCK.

kosaki	2011-05-08 17:52:25 +0900 (Sun, 08 May 2011)

  New Revision: 31479

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

  Log:
    revert r31474. we cann't call xmalloc under FGLOCK.
    
    Thansk, nagachika-san.

  Modified files:
    trunk/ChangeLog
    trunk/thread_pthread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31478)
+++ ChangeLog	(revision 31479)
@@ -10,13 +10,6 @@
 
 	* ext/date/date_core.c (date_s_test_*): use macros.
 
-Sun May  8 10:54:06 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
-
-	* thread_pthread.c (add_signal_thread_list): use xmalloc instead
-	  of malloc.
-	* thread_pthread.c (remove_signal_thread_list): use xfree instead
-	  of free.
-
 Sun May  8 10:24:16 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* thread_pthread.c: cleanup signal_thread_list related ifdef.
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 31478)
+++ thread_pthread.c	(revision 31479)
@@ -897,7 +897,7 @@
     if (!th->native_thread_data.signal_thread_list) {
 	FGLOCK(&signal_thread_list_lock, {
 	    struct signal_thread_list *list =
-	      xmalloc(sizeof(struct signal_thread_list));
+	      malloc(sizeof(struct signal_thread_list));
 
 	    if (list == 0) {
 		fprintf(stderr, "[FATAL] failed to allocate memory\n");
@@ -932,7 +932,7 @@
 	    }
 	    th->native_thread_data.signal_thread_list = 0;
 	    list->th = 0;
-	    xfree(list); /* ok */
+	    free(list); /* ok */
 	});
     }
 }

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

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