From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2771 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] move the definition of __pthread_tsd_main in the only compilation unit that references it Date: Mon, 11 Feb 2013 11:24:16 +0100 Message-ID: <20130211102415.GZ6181@port70.net> References: <1360574285.9132.14.camel@eris.loria.fr> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1360578265 6104 80.91.229.3 (11 Feb 2013 10:24:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Feb 2013 10:24:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2772-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 11 11:24:47 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1U4qZ5-0005wm-Ar for gllmg-musl@plane.gmane.org; Mon, 11 Feb 2013 11:24:47 +0100 Original-Received: (qmail 15902 invoked by uid 550); 11 Feb 2013 10:24:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15892 invoked from network); 11 Feb 2013 10:24:27 -0000 Content-Disposition: inline In-Reply-To: <1360574285.9132.14.camel@eris.loria.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2771 Archived-At: * Jens Gustedt [2013-02-11 10:19:44 +0100]: > This also avoids a const cast that doesn't seem to be very useful. > > 0 3 src/thread/pthread_key_create.c > 4 4 src/thread/pthread_self.c > > diff --git a/src/thread/pthread_key_create.c b/src/thread/pthread_key_create.c > index e51cb02..084cbaa 100644 > --- a/src/thread/pthread_key_create.c > +++ b/src/thread/pthread_key_create.c > @@ -1,8 +1,5 @@ > #include "pthread_impl.h" > > -const size_t __pthread_tsd_size = sizeof(void *) * PTHREAD_KEYS_MAX; > -void *__pthread_tsd_main[PTHREAD_KEYS_MAX] = { 0 }; > - > static void (*keys[PTHREAD_KEYS_MAX])(void *); __pthread_tsd_size was used in pthread_attr_setstack, so we guarantee that the thread has at least that much stack but recently the policy was changed around tls see git log --patch src/thread/pthread_attr_setstack.c so yes __pthread_tsd_size is not used anymore