tag 654783 pending thanks El 20 d’abril de 2012 8:47, Petr Salinger <[email protected]> ha escrit: > In the original (plain linuxthreads) code, with thread implemented as > freebsd process, the wakeup signal is sent to thread manager from kernel, > after exit of thread. > > In current variant, with thread implemented as freebsd kernel thread, > the wakeup signal is sent to thread manager from userspace, a few moments > before exit. It is an expected race condition. It is also the reason, why > "|| main_thread_exiting" have been added. I expected, that loss of a > wakeup does not matter, the "child thread" will be "eaten" only slightly > later, when another thread exits and sends wake up. The only problem should > be, when there is no another thread, it should be solved by > "|| main_thread_exiting". But it does not suffice. > > The "try eat dead child" everytime is just workaround.
Yep, eating dead children everytime doesn't sound like the cleanest option to me either ;-) > The better way might be to add atomic counter > [using gcc's __sync_fetch_and_add()] to track the number of expected "dead > or soon to be dead" child > and "try to eat dead child" when the number is above zero. Thanks for the heads-up. I notice you already fixed this in pkg-glibc SVN. Maybe it's not worth improving further... (IMHO time would be better spent on NPTL). Thank you! -- Robert Millan -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/CAOfDtXOQpP8BOjXXS5vHTLOFW=yr-kyvvw8fdg8syntxhi5...@mail.gmail.com

