Re-use of user-defined stacks for threads

Ulrich Drepper drepper@redhat.com
Tue Nov 28 13:09:00 GMT 2000


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


More information about the Libc-alpha mailing list