Subject: [PATCH, UNFINISHED] Fix handling of have_kernel_resources on Mach/Hurd. From: Thomas Schwinge Further comments by Neal: do you want a reply on the libpthread one inline? the short answer is: yes, that's a bug unfortunately, your fix is not enough the predicate controls two resources: the wakeup port and the thread itself Oh, right, I see. also, there may be a race: set the predicate to free, then kill the thread that's not so good so a proper solution requires a bit more thought I think I wondered about that as well. But isn't there the same problem with Viengoos? it is difficult as cleanly committing suicide is hard :-) could be on viengoos, I don't actually deallocate the thread in pt-thread-halt.c I just call suspend the thread is only deallocated in pt-thread-dealloc.c