From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27230 invoked by alias); 11 Aug 2004 12:56:02 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 27170 invoked from network); 11 Aug 2004 12:56:01 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sourceware.org with SMTP; 11 Aug 2004 12:56:01 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i7BAd13j012588; Wed, 11 Aug 2004 12:39:01 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i7BAcxE6012580; Wed, 11 Aug 2004 12:39:00 +0200 Date: Wed, 11 Aug 2004 12:56:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Avoid pthread_exit in librt.so.1 Message-ID: <20040811103859.GU30497@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2004-08/txt/msg00031.txt.bz2 Hi! Its a little hard to preach how costly pthread_exit (NULL); at the very end of a thread main routine is compared to return NULL when glibc itself uses it too... 2004-08-11 Jakub Jelinek * sysdeps/pthread/aio_misc.c (handle_fildes_io): Remove noreturn attribute. Return NULL instead of calling pthread_exit at the end. --- libc/sysdeps/pthread/aio_misc.c.jj 2004-05-26 16:05:31.000000000 +0200 +++ libc/sysdeps/pthread/aio_misc.c 2004-08-11 14:51:49.358696666 +0200 @@ -1,5 +1,6 @@ /* Handle general operations. - Copyright (C) 1997,1998,1999,2000,2001,2003 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -470,7 +471,6 @@ __aio_enqueue_request (aiocb_union *aioc static void * -__attribute__ ((noreturn)) handle_fildes_io (void *arg) { pthread_t self = pthread_self (); @@ -676,7 +676,7 @@ handle_fildes_io (void *arg) } while (runp != NULL); - pthread_exit (NULL); + return NULL; } Jakub