diff options
author | Christopher Faylor <me@cgf.cx> | 2002-08-01 16:20:31 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-08-01 16:20:31 +0000 |
commit | b6bd703781fdbe466e5a4d41e16743a642e7c0d3 (patch) | |
tree | aa275a070284b0dfb7678c94d881b8ea87544b5f /winsup/cygwin/window.cc | |
parent | 3874ac637cba083178c9e678e4cefcd204898c8e (diff) | |
download | cygnal-b6bd703781fdbe466e5a4d41e16743a642e7c0d3.tar.gz cygnal-b6bd703781fdbe466e5a4d41e16743a642e7c0d3.tar.bz2 cygnal-b6bd703781fdbe466e5a4d41e16743a642e7c0d3.zip |
* Makefile.in (DLL_OFILES): Add cygthread.o.
* dcrt0.cc (dll_crt0_1): Eliminate various thread initialization functions in
favor of new cygthread class.
* debug.cc: Remove thread manipulation functions.
* debug.h: Ditto.
* external.cc (cygwin_internal): Use cygthread method for determining thread
name. Remove capability for setting thread name.
* fhandler_console.cc (fhandler_console::read): Use cygthread method rather
than iscygthread function.
* fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Use cygthread
methods to create threads.
(fhandler_tty_common::__acquire_output_mutex): Use cygthread method to retrieve
thread name.
* select.cc (pipeinf): Use cygthread pointer rather than handle.
(start_thread_pipe): Ditto.
(pipe_cleanup): Ditto.
(serialinf): Ditto.
(start_thread_serial): Ditto.
(serial_cleanup): Ditto.
(socketinf): Ditto.
(start_thread_socket): Ditto.
(socket_cleanup): Ditto.
* sigproc.cc (hwait_sig): Ditto.
(hwait_subproc): Ditto.
(proc_terminate): Ditto.
(sigproc_terminate): Ditto.
(sigproc_init): Initialize cygthread hwait_sig pointer.
(subproc_init): Initialize cygthread hwait_subproc pointer.
(wait_sig): Rely on cygthread HANDLE operator.
* strace.cc (strace::vsprntf): Use cygthread::name rather than threadname.
* window.cc (gethwnd): Use cygthread method to initialize thread.
Diffstat (limited to 'winsup/cygwin/window.cc')
-rw-r--r-- | winsup/cygwin/window.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/winsup/cygwin/window.cc b/winsup/cygwin/window.cc index 38b19c418..7919ab17e 100644 --- a/winsup/cygwin/window.cc +++ b/winsup/cygwin/window.cc @@ -24,6 +24,7 @@ details. */ #include "cygerrno.h" #include "perprocess.h" #include "security.h" +#include "cygthread.h" static NO_COPY UINT timer_active = 0; static NO_COPY struct itimerval itv; @@ -131,19 +132,11 @@ gethwnd () if (ourhwnd != NULL) return ourhwnd; - HANDLE hThread; + cygthread *h; window_started = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL); - hThread = makethread (Winmain, NULL, 0, "win"); - if (!hThread) - { - system_printf ("Cannot start window thread"); - } - else - { - SetThreadPriority (hThread, THREAD_PRIORITY_HIGHEST); - CloseHandle (hThread); - } + h = new cygthread (Winmain, NULL, "win"); + SetThreadPriority (*h, THREAD_PRIORITY_HIGHEST); WaitForSingleObject (window_started, INFINITE); CloseHandle (window_started); return ourhwnd; |