revert r31474. we cann't call xmalloc under FGLOCK.

Thansk, nagachika-san.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-05-08 08:52:25 +00:00
parent 847b461452
commit 1816a4a6a9
2 changed files with 2 additions and 9 deletions

View File

@ -10,13 +10,6 @@ Sun May 8 16:56:19 2011 Tadayoshi Funaba <tadf@dotrb.org>
* ext/date/date_core.c (date_s_test_*): use macros.
Sun May 8 10:54:06 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* 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@gmail.com>
* thread_pthread.c: cleanup signal_thread_list related ifdef.

View File

@ -897,7 +897,7 @@ add_signal_thread_list(rb_thread_t *th)
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 @@ remove_signal_thread_list(rb_thread_t *th)
}
th->native_thread_data.signal_thread_list = 0;
list->th = 0;
xfree(list); /* ok */
free(list); /* ok */
});
}
}