From b01ff453d9a8e19b1eeb3874e327b18d54f2bf46 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 10 Oct 2002 05:31:43 +0000 Subject: [PATCH] * window.cc (gethwnd): Use SetThreadPriority method. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/window.cc | 15 +++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7ed69ffaf..f383b6d01 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2002-10-10 Christopher Faylor + + * window.cc (gethwnd): Use SetThreadPriority method. + 2002-10-10 Christopher Faylor * Makefile.in (new-cygwin1.dll): Reorganize library order. diff --git a/winsup/cygwin/window.cc b/winsup/cygwin/window.cc index 04ce590ee..7c67fae26 100644 --- a/winsup/cygwin/window.cc +++ b/winsup/cygwin/window.cc @@ -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); - } + 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; }