diff options
author | Christopher Faylor <me@cgf.cx> | 2005-10-18 03:27:00 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-10-18 03:27:00 +0400 |
commit | 267e201dae394e2d5deaa00fc2d4904a311210d8 (patch) | |
tree | 987ed376cf4af33ebd83038e81ed295158f5f671 /winsup/cygwin/pipe.cc | |
parent | 8b00a766ff6986a76a794e3b21539023910dacd3 (diff) |
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.
Diffstat (limited to 'winsup/cygwin/pipe.cc')
-rw-r--r-- | winsup/cygwin/pipe.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 3407f0945..8d16b1742 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -181,7 +181,7 @@ fhandler_pipe::read (void *in_ptr, size_t& in_len) else { pipeargs pi = {dynamic_cast<fhandler_base *>(this), in_ptr, &in_len}; - cygthread *th = new cygthread (read_pipe, &pi, "read_pipe"); + cygthread *th = new cygthread (read_pipe, 0, &pi, "read_pipe"); if (th->detach (read_state) && !in_len) in_len = (size_t) -1; /* received a signal */ } @@ -236,7 +236,6 @@ fhandler_pipe::fixup_after_exec () void fhandler_pipe::fixup_after_fork (HANDLE parent) { -debug_printf ("here"); fhandler_base::fixup_after_fork (parent); if (guard) fork_fixup (parent, guard, "guard"); |