* 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.
This commit is contained in:
Christopher Faylor
2002-08-01 16:20:31 +00:00
parent 3874ac637c
commit b6bd703781
15 changed files with 321 additions and 287 deletions

View File

@@ -18,6 +18,7 @@ details. */
#include "perprocess.h"
#include "cygwin_version.h"
#include "hires.h"
#include "cygthread.h"
#define PROTECT(x) x[sizeof(x)-1] = 0
#define CHECK(x) if (x[sizeof(x)-1] != 0) { small_printf("array bound exceeded %d\n", __LINE__); ExitProcess(1); }
@@ -111,7 +112,7 @@ strace::vsprntf (char *buf, const char *func, const char *infmt, va_list ap)
char fmt[80];
static NO_COPY int nonewline = FALSE;
DWORD err = GetLastError ();
const char *tn = threadname (0);
const char *tn = cygthread::name ();
char *pn = __progname ?: myself->progname;
int microsec = microseconds ();