From patchwork Mon Sep 6 18:18:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Pero X-Patchwork-Id: 63952 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 0FA32B70E0 for ; Tue, 7 Sep 2010 04:18:38 +1000 (EST) Received: (qmail 14357 invoked by alias); 6 Sep 2010 18:18:36 -0000 Received: (qmail 14346 invoked by uid 22791); 6 Sep 2010 18:18:35 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Sep 2010 18:18:20 +0000 Received: from eggs.gnu.org ([140.186.70.92]:59258) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OsgGn-0004Iu-Re for gcc-patches@gnu.org; Mon, 06 Sep 2010 14:18:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OsgGk-0002KL-Uf for gcc-patches@gnu.org; Mon, 06 Sep 2010 14:18:18 -0400 Received: from smtp181.iad.emailsrvr.com ([207.97.245.181]:36758) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OsgGk-0002Jq-Rg for gcc-patches@gnu.org; Mon, 06 Sep 2010 14:18:14 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp38.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id BBD44348691 for ; Mon, 6 Sep 2010 14:18:11 -0400 (EDT) Received: from dynamic6.wm-web.iad.mlsrvr.com (dynamic6.wm-web.iad1a.rsapps.net [192.168.2.147]) by smtp38.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id A57F8348690 for ; Mon, 6 Sep 2010 14:18:11 -0400 (EDT) Received: from meta-innovation.com (localhost [127.0.0.1]) by dynamic6.wm-web.iad.mlsrvr.com (Postfix) with ESMTP id 941673F0054 for ; Mon, 6 Sep 2010 14:18:11 -0400 (EDT) Received: by www2.webmail.us (Authenticated sender: nicola.pero@meta-innovation.com, from: nicola.pero@meta-innovation.com) with HTTP; Mon, 6 Sep 2010 20:18:11 +0200 (CEST) Date: Mon, 6 Sep 2010 20:18:11 +0200 (CEST) Subject: Fix for libobjc/PR 19850 From: "Nicola Pero" To: gcc-patches@gnu.org MIME-Version: 1.0 X-Type: plain Message-ID: <1283797091.602419157@192.168.2.227> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.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;