diff options
author | Christopher Faylor <me@cgf.cx> | 2002-08-06 09:08:55 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-08-06 09:08:55 +0400 |
commit | 1524ae42cf8595fd9a31084382ade0ff17172626 (patch) | |
tree | ede26f12347598e90e3f481198a5f35b6fe0c647 /winsup/cygwin/fhandler_tty.cc | |
parent | ffebb4fe0c3e1c3ca5ab14ec7737da054e2dc096 (diff) |
* cygthread.cc (cygthread::stub): Accept flag to pass info structure to thread
function.
(cygthread::operator new): Add defense debugging output.
(cygthread::cygthread): Add debugging output. Set name after thread has been
awakened to avoid a race.
(cygthread::exit_thread): Use handle operator rather than using ev directly.
(cygthread::exit_thread): Reorganize to provide debugging. Set __name to NULL.
* cygthread.h (cygself): Define.
* fhandler_tty.cc (fhandler_tty_master::init): Use cygself as argument so that
invoked thread can access its own info.
(process_output): Derive cygthread info of thread from thread argument.
* sigproc.cc (sigproc_init): Use cygself as argument so that invoked thread can
access its own info.
(wait_sig): Derive cygthread info of thread from thread argument.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index a7b7d814d..acc32f883 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -69,7 +69,7 @@ fhandler_tty_master::init (int ntty) h = new cygthread (process_ioctl, NULL, "ttyioctl"); SetThreadPriority (*h, THREAD_PRIORITY_HIGHEST); - output_thread = new cygthread (process_output, NULL, "ttyout"); + output_thread = new cygthread (process_output, cygself, "ttyout"); SetThreadPriority (*output_thread, THREAD_PRIORITY_HIGHEST); return 0; @@ -369,7 +369,7 @@ out: } static DWORD WINAPI -process_output (void *) +process_output (void *self) { char buf[OUT_BUFFER_SIZE*2]; @@ -380,7 +380,7 @@ process_output (void *) { if (n < 0) termios_printf ("ReadFile %E"); - cygthread *t = tty_master->output_thread; + cygthread *t = (cygthread *) self; tty_master->output_thread = NULL; t->exit_thread (); } |