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/dcrt0.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/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 42fed831f..8d4d72dd7 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -33,6 +33,7 @@ details. */ #include "shared_info.h" #include "cygwin_version.h" #include "dll_init.h" +#include "cygthread.h" #include "cygwin/cygserver_transport.h" #include "cygwin/cygserver.h" @@ -40,8 +41,8 @@ details. */ #define PREMAIN_LEN (sizeof (user_data->premain) / sizeof (user_data->premain[0])) -HANDLE NO_COPY hMainProc = NULL; -HANDLE NO_COPY hMainThread = NULL; +HANDLE NO_COPY hMainProc; +HANDLE NO_COPY hMainThread; sigthread NO_COPY mainthread; // ID of the main thread @@ -571,10 +572,8 @@ dll_crt0_1 () user_data->resourcelocks->Init (); user_data->threadinterface->Init (user_data->forkee); - threadname_init (); (void) getpagesize (); /* initialize page size constant */ - regthread ("main", GetCurrentThreadId ()); mainthread.init ("mainthread"); // For use in determining if signals // should be blocked. @@ -632,6 +631,7 @@ dll_crt0_1 () /* Initialize the cygwin subsystem if this is the first process, or attach to shared data structures if it's already running. */ memory_init (); + cygthread::init (); ProtectHandle (hMainProc); ProtectHandle (hMainThread); |