Re-use of user-defined stacks for threads

Wolfram Gloger Wolfram.Gloger@dent.med.uni-muenchen.de
Wed Nov 29 03:37:00 GMT 2000


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.


More information about the Libc-alpha mailing list