* cygthread.cc (cygthread::async_create): Define new function.
* cygthread.h (cygthread::create): Use correct regparm. (cygthread::standalone): Delete from class and from all constructors. (cygthread::cygthread): Use three only arguments for detached threads, and start the thread via QueueUserAPC/async_create. * dcrt0.cc (dll_crt0_0): Remove handling for wincap.has_buggy_thread_startup. (dll_crt0_1): Ditto. * wincap.cc: Ditto throughout. * wincap.h: Ditto.
This commit is contained in:
@@ -186,6 +186,17 @@ out:
|
||||
return info;
|
||||
}
|
||||
|
||||
/* This function is called via QueueUserAPC. Apparently creating threads
|
||||
asynchronously is a huge performance win on Win64. */
|
||||
void CALLBACK
|
||||
cygthread::async_create (ULONG_PTR arg)
|
||||
{
|
||||
cygthread *that = (cygthread *) arg;
|
||||
that->create ();
|
||||
::SetThreadPriority (that->h, THREAD_PRIORITY_HIGHEST);
|
||||
that->zap_h ();
|
||||
}
|
||||
|
||||
void
|
||||
cygthread::create ()
|
||||
{
|
||||
|
Reference in New Issue
Block a user