From patchwork Mon Sep 6 18:18:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fix for libobjc/PR 19850 Date: Mon, 06 Sep 2010 08:18:11 -0000 From: Nicola Pero X-Patchwork-Id: 63952 Message-Id: <1283797091.602419157@192.168.2.227> To: gcc-patches@gnu.org Applied to trunk. This trivial fix has been in use for years in the GNUstep fork/distribution of the GNU Objective-C runtime. Tested on i686-pc-linux-gnu with no regressions. Thanks Index: ChangeLog =================================================================== --- ChangeLog (revision 163922) +++ ChangeLog (revision 163923) @@ -1,3 +1,10 @@ +2010-09-06 Nicola Pero + + PR libobjc/19850 + * gthr-posix.h (__gthread_objc_thread_detach): Use + _objc_thread_attribs when detaching a thread. + * gthr-posix95.h (__gthread_objc_thread_detach): Same change. + 2010-09-06 H.J. Lu PR target/45524 Index: gthr-posix.h =================================================================== --- gthr-posix.h (revision 163922) +++ gthr-posix.h (revision 163923) @@ -370,7 +370,8 @@ if (!__gthread_active_p ()) return NULL; - if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg))) + if (!(__gthrw_(pthread_create) (&new_thread_handle, &_objc_thread_attribs, + (void *) func, arg))) thread_id = (objc_thread_t) new_thread_handle; else thread_id = NULL; Index: gthr-posix95.h =================================================================== --- gthr-posix95.h (revision 163922) +++ gthr-posix95.h (revision 163923) @@ -294,7 +294,8 @@ if (!__gthread_active_p ()) return NULL; - if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg))) + if (!(__gthrw_(pthread_create) (&new_thread_handle, &_objc_thread_attribs, + (void *) func, arg))) thread_id = (objc_thread_t) new_thread_handle; else thread_id = NULL;