aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-09-06 15:57:44 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-09-06 15:57:44 +0000
commit708e07fbd3eb105fe1104b7238bd66cedbb70e62 (patch)
treedc48d185a19db78cf86bf3471326b788dfad11d3
parent6fa0abcfd9e30f91ec37f4ee61431ed9caa68046 (diff)
downloadgcc-708e07fbd3eb105fe1104b7238bd66cedbb70e62.zip
gcc-708e07fbd3eb105fe1104b7238bd66cedbb70e62.tar.gz
gcc-708e07fbd3eb105fe1104b7238bd66cedbb70e62.tar.bz2
re PR libobjc/19850 (libobjc leaks threads on posix)
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. From-SVN: r163923
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/gthr-posix.h3
-rw-r--r--gcc/gthr-posix95.h3
3 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4ae3418..157286d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/gthr-posix.h b/gcc/gthr-posix.h
index bda43cd..47b8817 100644
--- a/gcc/gthr-posix.h
+++ b/gcc/gthr-posix.h
@@ -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;
diff --git a/gcc/gthr-posix95.h b/gcc/gthr-posix95.h
index 2b26f2d..69596d3 100644
--- a/gcc/gthr-posix95.h
+++ b/gcc/gthr-posix95.h
@@ -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;