#4888: proposal for pthreads extensions for suspend/resume --------------------------------+------------------------------------------- Reporter: andrewbachmann | Owner: axeld Type: enhancement | Status: closed Priority: normal | Milestone: R1 Component: System/libroot.so | Version: Resolution: invalid | Keywords: Blockedby: | Platform: All Blocking: | --------------------------------+------------------------------------------- Comment(by andrewbachmann): I didn't see the replies to this issue until just now, for some reason I didn't get email notification. In OpenJDK, in os_solaris.[hc]pp the methods thr_create and thr_continue are used to create and start the pthreads corresponding to java threads. thr_create is called with a flag to start suspended, which allows for reliable and straightforward java thread initiation. In POSIX, flags such as THREAD_SUSPENDED (solaris) are provided via attributes. This was my rationale for proposing the pthread_attr_(get/set)startsuspended. With the addition of the get_pthread_thread_id(), I am fine with not supplying pthread_suspend and pthread_continue. It does seem odd to require a pthread-oriented program to go through the thread_id in order to perform this functionality. There are two barriers to creating the thread through spawn_thread. The first is that spawn_thread doesn't provide a means to specify the stack size. (functionality used by OpenJDK) The second is the lack of the proposed convert_to_pthread() method, which would be required to maintain the rest of the code using pthread methods. I believe my proposal is the simplest and smallest change to provide the functionality used by OpenJDK. -- Ticket URL: <http://dev.haiku-os.org/ticket/4888#comment:9> Haiku <http://dev.haiku-os.org> Haiku - the operating system.