Age | Commit message (Collapse) | Author | |
---|---|---|---|
2009-06-22 | [UNFINISHED] Fix handling of have_kernel_resources on Mach/Hurd. | Thomas Schwinge | |
<http://lists.gnu.org/archive/html/bug-hurd/2009-04/msg00028.html> Further comments by Neal: <neal> do you want a reply on the libpthread one inline? <neal> the short answer is: yes, that's a bug <neal> unfortunately, your fix is not enough <neal> the predicate controls two resources: the wakeup port and the thread itself <tschwinge> Oh, right, I see. <neal> also, there may be a race: <neal> set the predicate to free, then kill the thread <neal> that's not so good <neal> so a proper solution requires a bit more thought <tschwinge> I think I wondered about that as well. But isn't there the same problem with Viengoos? <neal> it is difficult as cleanly committing suicide is hard :-) <neal> could be <neal> on viengoos, I don't actually deallocate the thread in pt-thread-halt.c <neal> I just call suspend <neal> the thread is only deallocated in pt-thread-dealloc.c | |||
2005-05-04 | libpthread/ | Neal H. Walfield | |
2005-05-04 Neal H. Walfield <neal@gnu.org> * Makefile (SRCS): Add pt-thread_dealloc.c. * sysdeps/mach/pt-thread-dealloc.c: New file. * pthread/pt-internal.h (__pthread_thread_dealloc): New declaration. (__pthread_thread_halt): Add parameter NEED_DEALLOC. Update callers. * sysdeps/mach/pt-thread-halt.c (__pthread_thread_halt): Respect new NEED_DEALLOC parameter. Move code which deallocates kernel resources from here ... * sysdeps/mach/pt-thread-dealloc.c (__pthread_thread_dealloc): ...to here. * pthread/pt-create.c (__pthread_create_internal): Call __pthread_thread_dealloc on failure. * pthread/pt-exit.c (pthread_exit): Call __pthread_thread_dealloc. * sysdeps/mach/pt-thread-alloc.c (create_wakeupmsg): Call __mach_port_destroy to deallocate the receive right. __mach_port_deallocate won't do it. * pthread/pt-detach.c (pthread_detach): Don't call __pthread_thread_halt a second time. * sysdeps/mach/hurd/pt-sysdep.c (_cthread_init_routine): Fix declaration. (init_routine): Update declaration and remove gratuitous cast. |