OSDN Git Service

PR libobjc/19850
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Sep 2010 15:57:44 +0000 (15:57 +0000)
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Sep 2010 15:57:44 +0000 (15:57 +0000)
       * gthr-posix.h (__gthread_objc_thread_detach): Use
       _objc_thread_attribs when detaching a thread.
       * gthr-posix95.h (__gthread_objc_thread_detach): Same change.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163923 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/gthr-posix.h
gcc/gthr-posix95.h

index 4ae3418..157286d 100644 (file)
@@ -1,3 +1,10 @@
+2010-09-06  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       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  <hongjiu.lu@intel.com>
 
        PR target/45524
index bda43cd..47b8817 100644 (file)
@@ -370,7 +370,8 @@ __gthread_objc_thread_detach (void (*func)(void *), void *arg)
   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 2b26f2d..69596d3 100644 (file)
@@ -294,7 +294,8 @@ __gthread_objc_thread_detach (void (*func)(void *), void *arg)
   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;