This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Re-use of user-defined stacks for threads


Wolfram Gloger <wmglo@dent.med.uni-muenchen.de> writes:

> LinuxThreads breaks this, because the actual freeing of the thread
> resources within the stack can occur _after_ pthread_join() has
> returned.  Below is a fix.

I agree with the analysis but the patch is not OK.  It creates a race.
If the manager is restarting the joining thread before the latter
actually suspended itself we have a problem.

Probably the joining thread should deallocate the stack somehow.
Don't know yet what the solution should be.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]