* window.cc (gethwnd): Use SetThreadPriority method.

This commit is contained in:
Christopher Faylor 2002-10-10 05:31:43 +00:00
parent 2a3bf3e2ce
commit b01ff453d9
2 changed files with 11 additions and 8 deletions

View File

@ -1,3 +1,7 @@
2002-10-10 Christopher Faylor <cgf@redhat.com>
* window.cc (gethwnd): Use SetThreadPriority method.
2002-10-10 Christopher Faylor <cgf@redhat.com>
* Makefile.in (new-cygwin1.dll): Reorganize library order.

View File

@ -103,10 +103,10 @@ Winmain (VOID *)
}
/* Create hidden window. */
ourhwnd = CreateWindow (classname, classname,
WS_POPUP, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, (HWND) NULL,
(HMENU) NULL, user_data->hmodule, (LPVOID) NULL);
ourhwnd = CreateWindow (classname, classname, WS_POPUP, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
(HWND) NULL, (HMENU) NULL, user_data->hmodule,
(LPVOID) NULL);
SetEvent (window_started);
@ -119,9 +119,7 @@ Winmain (VOID *)
/* Start the message loop. */
while (GetMessage (&msg, ourhwnd, 0, 0) == TRUE)
{
DispatchMessage (&msg);
}
return msg.wParam;
}
@ -136,9 +134,10 @@ gethwnd ()
window_started = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
h = new cygthread (Winmain, NULL, "win");
SetThreadPriority (*h, THREAD_PRIORITY_HIGHEST);
h->SetThreadPriority (THREAD_PRIORITY_HIGHEST);
WaitForSingleObject (window_started, INFINITE);
CloseHandle (window_started);
h->zap_h ();
return ourhwnd;
}