From 267e201dae394e2d5deaa00fc2d4904a311210d8 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 17 Oct 2005 23:27:00 +0000 Subject: Change process_lock to lock_process throughout. Change all calls to new cygthread to handle extra argument, throughout. * cygthread.h (cygthread::callproc): Declare new method. (cygthread::cygthread): Add optional length argument to allow copying arguments to executing thread. * cygthread.cc (cygthread::callproc): Define new method. (cygthread::stub): Use callfunc to invoke thread func to allow potentially allocating stack memory which will be returned. (cygthread::simplestub): Ditto. (cygthread::cygthread): Accept arglen argument. Reset ev here prior to activating thread. Wait for ev after activating thread if we're copying contents to the thread. Wait until the end before setting h, to allow thread synchronization. (cygthread::release): Don't reset ev here. Rely on that happening the next time the thread is activated. * pinfo.h (commune_process): Rename declaration from _pinfo::commune_process. * pinfo.cc (commune_process): Ditto for definition. Modify slightly to allow running as a separate cygthread. * sigproc.cc (child_info::sync): Always wait for both subproc_ready and any hProcess if we have a cygwin parent. (talktome): Change argument to be a pointer to siginfo_t. Contiguously allocate whole siginfo_t structure + any needed extra for eventual passing to commune_process thread. (wait_sig): Accommodate change in talktome argument. * pipe.cc (fhandler_pipe::fixup_after_exec): Remove debugging. --- winsup/cygwin/fhandler_tty.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/fhandler_tty.cc') diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 5016c5a4f..630caedca 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -81,15 +81,15 @@ fhandler_tty_master::init () set_close_on_exec (true); cygthread *h; - h = new cygthread (process_input, cygself, "ttyin"); + h = new cygthread (process_input, 0, cygself, "ttyin"); h->SetThreadPriority (THREAD_PRIORITY_HIGHEST); h->zap_h (); - h = new cygthread (process_ioctl, cygself, "ttyioctl"); + h = new cygthread (process_ioctl, 0, cygself, "ttyioctl"); h->SetThreadPriority (THREAD_PRIORITY_HIGHEST); h->zap_h (); - h = new cygthread (process_output, cygself, "ttyout"); + h = new cygthread (process_output, 0, cygself, "ttyout"); h->SetThreadPriority (THREAD_PRIORITY_HIGHEST); h->zap_h (); -- cgit v1.2.3