Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110813184308.GK132@brightrain.aerifal.cx>
Date: Sat, 13 Aug 2011 14:43:08 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: cluts daily reports 8/12 - continuing pthread_eintr,
 still stuck with alloc

On Sat, Aug 13, 2011 at 08:49:43PM +0200, Luka Marčetić wrote:
> pthread_exit is allegedly called upon main thread function return,
> and it is specified to pop and execute pushed functions. I expected

pthread_exit is called implicitly upon the return from the start
function of any thread *except* the main thread. pthread_exit does pop
and execute cleanup handlers when it's called, but if it's called
implcitly due to return from the start function, there cannot be any
cleanup handlers left because execution has already left the scope of
any cleanup handler that may have been installed.

> 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?

Could you please explain what effect you're trying to achieve? Cleanup
handlers are rather useless unless you're using pthread_cancel.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.