This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Re-use of user-defined stacks for threads
Hello,
> 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.
That is correct, however aren't there already similar (minuscule)
races in the code, eg. in __pthread_create_2_1()'s use of suspend()?
> Probably the joining thread should deallocate the stack somehow.
That would be possible, but complicate things quite a bit, because
currently the manager only handles these things.
> Don't know yet what the solution should be.
I'll think about it some more.
Regards,
Wolfram.