From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/410 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?THVrYSBNYXLEjWV0acSH?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts daily reports 8/12 - continuing pthread_eintr, still stuck with alloc Date: Sat, 13 Aug 2011 20:49:43 +0200 Message-ID: <4E46C747.1080006@gmail.com> References: <4E4493E6.6050809@gmail.com> <20110812024151.GF132@brightrain.aerifal.cx> <4E45496A.3010505@gmail.com> <20110812153934.GI132@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1313261542 23072 80.91.229.12 (13 Aug 2011 18:52:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 13 Aug 2011 18:52:22 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-411-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 13 20:52:18 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1QsJJh-0006fT-F3 for gllmg-musl@lo.gmane.org; Sat, 13 Aug 2011 20:52:17 +0200 Original-Received: (qmail 9573 invoked by uid 550); 13 Aug 2011 18:52:16 -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 9565 invoked from network); 13 Aug 2011 18:52:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=NuawgWAo1l+AzE3TAxHxupYsMdXk9TIsBSpfboFEM4s=; b=OAjRCJ8V0CTl5SRxCUpWait+fDIJCYsME/he/elVSr4vVd5pcuSGEJPDEWgmt27tBG SK1jJNFVwQGVKZsjl8RSKR3TDIobKb8Be/g+yIZi7S/oaTRYy3kST/voSUJAPF0fHl3a qGJ8gxO4mpfvKoG6kjlz5c8lUANbl4AWmLpkU= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11 In-Reply-To: <20110812153934.GI132@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:410 Archived-At: On 08/12/2011 05:39 PM, Rich Felker wrote: > On Fri, Aug 12, 2011 at 05:40:26PM +0200, Luka Marčetić wrote: >>>> Both musl and glibc macros generate invalid code for this one, it >>>> ends with `do {;` in both cases iirc. Strange - what is it? >>> You might want to read this: >>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_cleanup_pop.html >>> >>> There's even a sample implementation in the rationale. >>> >>> Rich >> What I read was: >> >> "The thread exits (that is, calls/pthread_exit/())." >> >> Then I clicked the link(http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_exit.html), >> hoping to find this: >> >> "An implicit call to/pthread_exit/() is made when a thread other >> than the thread in which/main/() was first invoked returns from the >> start routine that was used to create it." >> >> And when I did, I've overlooked '{', expecting an '}'. I regard this >> as slight inconsistency in the standard. At least it's missing the >> word "explicitly", but I'd reword it altogether hehe. >> Anyway, I'll just cast the void* to a function pointer and call it directly. > I don't follow what you're saying in this email... > > Rich pthread_exit is allegedly called upon main thread function return, and it is specified to pop and execute pushed functions. I expected this to happen. I was blaming the spec for not being more specific, and saying that pthread_exit should be explicitly called. But in reality, perhaps even an implicit call should work, in which case the spec isn't to blame, but both implementations instead? Luka