public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Avoid pthread_exit in librt.so.1
Date: Wed, 11 Aug 2004 12:56:00 -0000	[thread overview]
Message-ID: <20040811103859.GU30497@sunsite.ms.mff.cuni.cz> (raw)

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  <jakub@redhat.com>

	* 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 <drepper@cygnus.com>, 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

             reply	other threads:[~2004-08-11 12:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-11 12:56 Jakub Jelinek [this message]
2004-08-11 18:51 ` Roland McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040811103859.GU30497@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).