summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/sigproc.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add comments to intentional switch fallthroughsCorinna Vinschen2016-11-241-0/+2
| | | | | | Clarify Coverity "Missing break in switch" messages. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* child_info::child_info: Fix a commentCorinna Vinschen2016-06-241-7/+2
|
* Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen2016-06-231-3/+0
| | | | | | | | | | | | | | Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause. Everything else stays under GPLv3+. New Linking Exception exempts resulting executables from LGPLv3 section 4. Add CONTRIBUTORS file to keep track of licensing. Remove 'Copyright Red Hat Inc' comments. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Revert "Refactor to avoid nonnull checks on "this" pointer."Corinna Vinschen2016-04-051-3/+2
| | | | | | | | | This reverts commit 0008bdea02b690ab19ffe997499cb9a96ee5a66d. This patch introduced a regression. Calling FOO=$(...) in zsh hangs indefinitely and has to be killed forcefully. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Refactor to avoid nonnull checks on "this" pointer.Peter Foley2016-04-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | G++ 6.0 asserts that the "this" pointer is non-null for member functions. Refactor methods that check if "this" is non-null to resolve this. winsup/cygwin/ChangeLog: external.cc (cygwin_internal): Check for a null pinfo before calling cmdline. fhandler_dsp.cc (Audio::blockSize): Make static. fhandler_dsp.cc (Audio_in): add default_buf_info. fhandler_dsp.cc (Audio_out): Ditto. fhandler_dsp.cc (Audio_out::buf_info): Refactor method to call default_buf_info if dev_ is null. fhandler_dsp.cc (Audio_in::buf_info): Ditto. fhandler_dsp.cc (fhandler_dev_dsp::_ioctl): Call Audio_out::default_buf_info if audio_out_ is null. fhandler_dsp.cc (fhandler_dev_dsp::_ioctl): Call Audio_in::default_buf_info if audio_in_ is null. fhandler_process.cc (format_process_fd): Check if pinfo is null. fhandler_process.cc (format_process_root): Ditto. fhandler_process.cc (format_process_cwd): Ditto. fhandler_process.cc (format_process_cmdline): Ditto. signal.cc (tty_min::kill_pgrp): Ditto. signal.cc (_pinfo::kill0): Ditto. sigproc.cc (pid_exists): Ditto. sigproc.cc (remove_proc): Ditto. times.cc (clock_gettime): Ditto. times.cc (clock_getcpuclockid): Ditto. path.cc (cwdstuff::override_win32_cwd): Check if old_cwd is null. path.cc (fcwd_access_t::Free): Factor null check of "this" out to caller(s). pinfo.cc (_pinfo::exists): Ditto. pinfo.cc (_pinfo::fd): Ditto. pinfo.cc (_pinfo::fds): Ditto. pinfo.cc (_pinfo::root): Ditto. pinfo.cc (_pinfo::cwd): Ditto. pinfo.cc (_pinfo::cmdline): Ditto. signal.cc (_pinfo::kill): Ditto. pinfo.cc (_pinfo::commune_request): remove non-null check on "this", as this method is only called from pinfo.cc after null checks pinfo.cc (_pinfo::pipe_fhandler): remove non-null check on "this", as this method is only called from pipe.cc (fhandler_pipe::open) after a null check. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
* Fix iterating over pending signals if a signal doesn't have to be clearedCorinna Vinschen2015-11-051-3/+8
| | | | | | | | | * sigproc.cc (pending_signals::clear): Yet another fix to fix the fix. Actually iterate over the list of pending signals even if there's a signal which doesn't have to be cleared. Other than that, revert loop to it's former self as a while loop. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix potential endless loop in pending_signals::clearCorinna Vinschen2015-11-031-9/+4
| | | | | | | * sigproc.cc (pending_signals::clear): Fix previous fix resulting in yet another endless loop. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix incorrect implementation to clear per-thread pending signalsCorinna Vinschen2015-11-021-5/+11
| | | | | | | | * sigproc.cc (class pending_signals): Drop sigproc_init friendship. (pending_signals::clear): Fix implementation to avoid subsequent endless loop in wait_sig. Improve comment. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Clear pending signals targeting exiting threadnewlib-snapshot-20151023Corinna Vinschen2015-10-231-1/+19
| | | | | | | | | | | * cygtls.cc (_cygtls::remove): Call remove_pending_sigs. * cygtls.h (_cygtls::remove_pending_sigs): Declare. * sigproc.cc (pending_signals::clear): Define new method taking a _cygtls pointer argument. Drop pending signals for that thread. (_cygtls::remove_pending_sigs): Call pending_signals::clear for this thread. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Sigproc.cc: Fix copyright.newlib-snapshot-20150824Corinna Vinschen2015-08-241-1/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Fix hang stracing forking processes but not following childCorinna Vinschen2015-08-241-1/+15
| | | | | | | | * ntdll.h (PROCESSINFOCLASS): Define ProcessDebugFlags. * sigproc.cc (child_info::child_info): Only propagate _CI_STRACED to child if strace is actually tracing child processes. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * cygheap.cc (init_cygheap::init_tls_list): Accommodate threadlistCorinna Vinschen2014-11-281-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | having a new type threadlist_t *. Convert commented out code into an #if 0. Create thread mutex. Explain why. (init_cygheap::remove_tls): Drop timeout value. Always wait infinitely for tls_sentry. Return mutex HANDLE of just deleted threadlist entry. (init_cygheap::find_tls): New implementation taking tls pointer as search parameter. Return threadlist_t *. (init_cygheap::find_tls): Return threadlist_t *. Define ix as auto variable. Drop exception handling since crash must be made impossible due to correct synchronization. Return with locked mutex. * cygheap.h (struct threadlist_t): Define. (struct init_cygheap): Convert threadlist to threadlist_t type. (init_cygheap::remove_tls): Align declaration to above change. (init_cygheap::find_tls): Ditto. (init_cygheap::unlock_tls): Define. * cygtls.cc (_cygtls::remove): Unlock and close mutex when finishing. * exceptions.cc (sigpacket::process): Lock _cygtls area of thread before accessing it. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * sigproc.cc (sig_send): Ditto. * thread.cc (pthread::exit): Ditto. Add comment. (pthread::cancel): Ditto.
* * init.cc (dll_entry): Revert previous patch. This requires anotherCorinna Vinschen2014-11-211-2/+11
| | | | | | | | | solution. * miscfuncs.cc (thread_wrapper): Ditto. * sigproc.cc (exit_thread): Disable sending a signal for synchronization with process exit. Explain why. Keep code in for later inspection, should the problem show up again. (sig_send): Use "tls", rather than "tid" as name for _cygtls arg.
* * sigproc.cc (sigproc_init): Set aside more buffer space for signal pipes.Christopher Faylor2014-07-151-2/+14
| | | | | (sig_send): Retry WriteFiles which fail when there is no error but packbytes have not been sent.
* * sigproc.cc (send_sig): Don't report an error if WriteFile succeeds.Christopher Faylor2014-07-151-1/+1
|
* * sigproc.cc (send_sig): Fix bad format in diagnostic output.Christopher Faylor2014-07-141-3/+3
|
* * sigproc.h (no_thread_exit_protect): New class.Christopher Faylor2014-03-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * sigproc.cc (thread_exit): Use no_thread_exit_protect to determine if we need to coordinate ThreadExit/ExitProcess. * fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::stop): Use no_thread_exit_protect to kludge around waiting for waveOutClose as it waits for a thread that never exits. (fhandler_dev_dsp::Audio_in::stop): Ditto for waveInClose. * fhandler.h (fhandler_dev_dsp::base): New method. (fhandler_dev_dsp::_read): Ditto. (fhandler_dev_dsp::_write): Ditto. (fhandler_dev_dsp::_ioctl): Ditto. (fhandler_dev_dsp::_fixup_after_fork): Ditto. (fhandler_dev_dsp::_fixup_after_exec): Ditto. * fhandler_dsp.cc (fhandler_dev_dsp::read): Call real function via base() pointer. (fhandler_dev_dsp::write): Ditto. (fhandler_dev_dsp::ioctl): Ditto. (fhandler_dev_dsp::fixup_after_fork): Ditto. (fhandler_dev_dsp::fixup_after_exec): Ditto. (fhandler_dev_dsp::_read): Rename by adding an leading underscore. (fhandler_dev_dsp::_write): Ditto. (fhandler_dev_dsp::_ioctl): Ditto. (fhandler_dev_dsp::_fixup_after_fork): Ditto. (fhandler_dev_dsp::_fixup_after_exec): Ditto.
* * sigproc.cc (_cygtls::remove_wq): Reset thread_ev inside of lock. Set to NULLChristopher Faylor2014-03-091-1/+2
| | | | when done.
* * sigproc.cc (sig_send): Don't bother with an error message if we are exiting.Christopher Faylor2014-02-091-6/+3
|
* * external.cc (fillout_pinfo): Remove nonsensical loop.Christopher Faylor2013-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | * fork.cc (frok::parent): When initializing pinfo for child new PID_NEW flag + actual defined constant rather than raw number. Don't set start_time here. * pinfo.cc (pinfo::thisproc): Use PID_NEW when initializing pinfo. Avoid checking h for NULL multiple times. Don't set start_time here. (pinfo_init): Aways set ppid last. Tweak strace output. (pinfo::init): Handle new PID_NEW flag. Wait for shared memory to contain useful information. Set start_time if PID_NEW. (_onreturn:h): Define as HANDLE rather than HANDLE *. (_onreturn::~onreturn): Accommodate h definition change. (_onreturn::no_close_handle): Rename from no_close_p_handle. Take a pinfo arg and set hProcess to h before zeroing. (winpids::add): Don't open a handle to our own process. Change logic associated with when a handle gets closed. Accommodate no_close_handle changes. (winpids::enum_processes): Simplify process enumeration loop. (winpids::set): Eliminate ill-considered malloc locking. * sigproc.cc (proc_subproc): Always set ppid last.
* * sigproc.cc (sig_send): Set PIPE_NOWAIT for pipes which are not us.Christopher Faylor2013-12-181-1/+10
|
* * globals.cc (hntdll): Define/declare.Christopher Faylor2013-12-091-0/+2
| | | | | | * exceptions.cc (inside_kernel): Don't call GetModuleFileName if we know we're in ntdll. * sigproc.cc (wait_sig): Initialize hntdll.
* * sigproc.cc (pending_signals::add): Properly maintain linked list.Christopher Faylor2013-08-301-3/+3
| | | | (wait_sig): Use already calculated 'next' element when signal is blocked.
* * DevNotes: Add entry cgf-000023.Christopher Faylor2013-06-071-15/+0
| | | | * sigproc.cc (exit_thread): Remove now-unneeded sleep code.
* * sigproc.cc (exit_thread): Allow to exit the thread while runningCorinna Vinschen2013-06-031-1/+10
| | | | global dtors. Explain why.
* * sigproc.cc (sig_hold): Delete.Christopher Faylor2013-05-161-51/+30
| | | | | | | (sigheld): Delete. (sig_send): Eliminate special-case __SIGHOLD handling. (wait_sig): Just flag when signals are on hold and add them to the queue rather than stalling the wait_sig loop. Clear the flag when __SIGNOHOLD is specified.
* * Merge in cygwin-64bit-branch.Corinna Vinschen2013-04-231-3/+3
|
* * cygtls.h (_cygtls::reset_signal_arrived): Actually reset the signal_arrivedChristopher Faylor2013-04-091-91/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | event. (_cygtls::handle_SIGCONT): Declare ew function. * cygwait.cc (is_cw_sig_handle): Delete. (is_cw_sig_cont): New convenience define. (cygwait): Clear signal if is_cw_sig_cont and we got a SIGCONT. * cygwait.h (cw_wait_mask): Add cw_sig_cont. * exceptions.cc (sig_handle_tty_stop): Tighten "incyg" region. Use cw_sig_cont param for cygwait. Don't zero signal here outside of lock. (sigpacket::setup_handler): Don't check for in_forkee since we will now never get here in that state. (_cygtls::handle_SIGCONT): Define new function. (sigpacket::process): Call handle_SIGCONT early to deal with SIGCONT. Nuke continue_now handling. Allow SIGKILL to kill a suspended process. Delete a couple of now-unneeded labels. (_cygtls::call_signal_handler): Reorganize setting of incyg within lock. * sigproc.cc (pending_signals): Simplify. (pending_signals::clear): New method. (_cygtls::remove_wq): Reorganize to always close wq.thread_ev if it exists to avoid handle leaks. (sig_clear): Simplify by just calling sigq.clear(). (sig_dispatch_pending): Always call sigq.pending even in signal thread to force another loop in wait_sig. (sig_send): Remove a "goto out" just before out: label. (pending_signals::add): Simplify. (pending_signals::del): Delete. (pending_signals::next): Delete. (wait_sig): Define variable q to be the start of the signal queue. Just iterate through sigq queue, deleting processed or zeroed signals. Only set clearwait when the current signal is SIGCHLD. * sigproc.h: Add a comment about an unused enum.
* * child_info.h (cygheap_exec_info::sigmask): Declare new field.Christopher Faylor2013-03-311-5/+12
| | | | | | | | | | | | | | | | | | | | | | | * cygheap.cc (init_cygheap::find_tls): Rename threadlist_ix -> ix. Only take one pass through thread list, looking for eligible threads to signal. Set a new param indicating that function has found a sigwait* mask. * cygheap.h (init_cygheap::find_tls): Reflect new parameter. * dcrt0.cc (parent_sigmask): New variable. (child_info_spawn::handle_spawn): Save parent's signal mask here. (dll_crt0_1): Restore parent's signal mask to tls sigmask as appropriate. Call sig_dispatch_pending to flush signal queue when we can finally do something with signals. * exceptions.cc (sigpacket::process): Avoid attempting to handle signals if we haven't finished initializing. Rely on the fact that find_tls will do mask checking and don't do it again. Delete ill-named 'dummy' variable. * sigproc.cc (cygheap_exec_info::alloc): Save calling thread's signal mask in new sigmask field. (wait_sig): Try to debug when WFSO fails and DEBUGGING is defined. * thread.cc (pthread::set_tls_self_pointer): Make this a true automatic method rather than inexplicably relying on a thread parameter. (pthread::thread_init_wrapper): Accommodate set_tls_self_pointer change to non-static. Initialize sigmask before setting tid or suffer signal races. * ehread.h (pthread::set_tls_self_pointer): Make non-static, delete parameter.
* * sigproc.cc (wait_sig): Avoid uninitialized use of nb when retrying.Christopher Faylor2013-03-291-16/+5
| | | | Consolidate two error messages into one.
* * sigproc.cc (pending_signals::retry): Declare new element.Christopher Faylor2013-03-291-41/+22
| | | | | | | | | (pending_signals::pending): Force an additional loop through wait_sig by setting retry whenever this function is called. (sig_send): Reorganize to wait for SIGHOLD at bottom. Always add signal to pending queue and work on whole queue rather than just the one signal. Loop when sigq.retry is set. Fix long-broken check for SIGCHLD after queued signals.
* Throughout, change __attribute__ ((regparm (N))) to just __regN. Throughout,Christopher Faylor2013-01-211-9/+9
| | | | | | | | | | | | | | | | | | | (mainly in fhandler*) start fixing gcc 4.7.2 mismatch between regparm definitions and declarations. * gendef: Define some functions to take @ declaration to accommodate _regN defines which use __stdcall. * gentls_offsets: Define __regN macros as empty. * autoload.cc (wsock_init): Remove unneeded regparm attribute. * winsup.h (__reg1): Define. (__reg2): Define. (__reg3): Define. * advapi32.cc (DuplicateTokenEx): Coerce some initializers to avoid warnings from gcc 4.7.2. * exceptions.cc (status_info): Declare struct to use NTSTATUS. (cygwin_exception::dump_exception): Coerce e->ExceptionCode to NTSTATUS. * fhandler_clipboard.cc (cygnativeformat): Redefine as UINT to avoid gcc 4.7.2 warnings. (fhandler_dev_clipboard::read): Ditto.
* * sigproc.cc (sig_dispatch_pending): Add correct regparm attributes to matchChristopher Faylor2013-01-201-8/+8
| | | | | | | | | declaration. (pid_exists): Ditto. (proc_subproc): Ditto. (sig_clear): Ditto. (sig_send): Ditto. (checkstate): Ditto.
* * exceptions.cc (ctrl_c_handler): Remove special-case handler forChristopher Faylor2013-01-191-1/+1
| | | | | | "cygwin_finished_initializing". * sigproc.cc (exit_thread): Undefine ExitThread earlier to avoid recursion on error return.
* * sigproc.cc (no_signals_available): Finally remove this macro entirely.Christopher Faylor2013-01-161-14/+3
| | | | | (exit_thread): Ensure process lock is released on error exit. (sig_send): Simplify "its_me" test. Remove no_signals_available tests.
* * exceptions.cc (signal_exit): Move captive process termintation...Christopher Faylor2013-01-141-16/+1
| | | | | | | | | | | | | | | | (_cygtls::interrupt_setup): ...into here. (sigpacket::process): Simplify setting of handler when have_execed. (_cygtls::interrupt_setup): Don't call proc_subproc when we've execed. * globals.cc (exit_states): Delete unneeded ES_EXEC_EXIT. * pinfo.cc (pinfo::exit): Change debugging output. Call proc_terminate rather than the now-obsolete sigproc_terminate. Don't set exit_state to ES_EXEC_EXIT. Set exit_state to ES_FINAL later. * sigproc.cc (sigproc_terminate): Delete function. (wait_sig): Don't call proc_subproc if have_execed. * sigproc.h (sigproc_terminate): Delete declaration. * sync.h (lock_process::lock_process): Don't set exit_state to ES_PROCESS_LOCKED. (lock_process::operator LONG): Define.
* * globals.cc (exit_states): Renumber so that ES_EXIT_STARTING is first, asChristopher Faylor2013-01-041-1/+1
| | | | | | intended. * sigproc.cc (wait_sig): Only stop accepting signals after exit_state > ES_EXIT_STARTING.
* * sigproc.cc (exit_thread): Set thread signal mask so that no signals are sentChristopher Faylor2013-01-031-1/+2
| | | | to an exiting thread.
* * sigproc.cc (no_signals_available): Remove exit_state test since signals areChristopher Faylor2013-01-031-16/+14
| | | | | | | | available in a limited fashion when exiting. (sig_dispatch_pending): Ditto. (sig_send): Ditto. (exit_thread): Rearrange to avoid an unnecessary DuplicateProcess when exiting. (wait_sig): Allow special signals when exiting.
* * cygtls.h (_cygtls::signal_exit): Delete from class.Christopher Faylor2013-01-021-113/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exception.h (cygwin_exception): New class. (cygwin_exception::dumpstack): Declare new function. (cygwin_exception::context): Ditto. (cygwin_exception::dump_exception): Ditto. * exceptions.cc (cygwin_exception::dump_exception): Move into cygwin_exception class. Accommodate new variable names. (cygwin_exception::dumpstack): Ditto stackdump -> dumpstack. (exception::handle): Move andreas processing earlier. Defer signal processing decisions to the signal thread where they belong. Pass exception information to sig_send via new siginfo_t si_cyg field. (ctrl_c_handler): Wait for SIGHUP signal to be processed since it could cause a process exit and we don't want races with thread exit lock. (signal_exit): Move back here from sigproc.cc. Modify arguments and remove from sigpacket class. Decide when to dump core based on signal type. (sigpacket::process): Handle exiting signals in context of threads rather than in the signal thread. Signal debugger on non-Windows signals. Remove setup_signal_exit call. * sigproc.cc (no_signals_available): Remove argument. (signal_exit_code): Delete. (close_my_readsig): Ditto. (_cygtls::signal_exit): Move to exceptions.cc. (sigproc_terminate): Don't attempt to terminate signal thread. (setup_signal_exit): Delete. (exit_thread): Use new si_cyg entry in siginfo_t. (sig_send): Just use empty initializer for si. Accommodate change in no_signals_available argument. (wait_sig): Remove attempt to "go asynchronous" on process exit. Delete __SIGEXIT handling. Don't ever exit. * sigproc.h: Remove __SIGEXIT from signal enum. Renumber. * include/cygwin/signal.h (siginfo_t): Add si_cyg entry.
* * sigproc.cc (wait_sig): Remove spurious extern.Christopher Faylor2012-12-311-1/+0
|
* * DevNotes: Add entry cgf-000019.Christopher Faylor2012-12-281-25/+50
| | | | | | | | | | | | | | | | | | | | | * dcrt0.cc (do_exit): Just set exit_state to ES_EVENTS_TERMINATE and nuke call to events_terminate which just set a superfluous flag. * sigproc.cc (signal_exit_code): New variable. (setup_signal_exit): Define new function. (_cygtls::signal_exit): Remove accommodations for closing the signal pipe handle. (exit_thread): Just sleep if we're exiting. (wait_sig): If signal_exit_code is set, just handle bookkeeping signals and exit ReadFile loop if there is nothing more to process. Call signal_exit at end if signal_exit_code is non-zero. * sigproc.h (setup_signal_exit): Declare new function. * exceptions.cc (sigpacket::process): Use setup_signal_exit to control exiting due to a signal. (exception::handle): Ditto. Query exit_state rather than defunct exit_already to determine if we are exiting. * globals.cc (ES_SIGNAL_EXIT): New enum. * sync.h (lock_process::release): New function for explicitly unlocking muto. (lock_process::~lock_process): Use release method.
* * sigproc.cc (exit_thread): undef ExitThread or suffer recursion. Attempt toChristopher Faylor2012-12-221-2/+4
| | | | lock process prior to calling sig_send.
* Revert the reversion and go with implementation described in cgf-000017, withChristopher Faylor2012-12-211-1/+48
| | | | | | | | | | | | | | | | | | | | | | some modifications. * init.cc (dll_entry): Revert previous change. * miscfuncs.cc: Include sigproc.h for exit_thread declaration. * winsup.h (ExitThread): Define as 'exit_thread' to ensure no accidental use. * sigproc.cc (exit_thread): New function. (wait_sig): Handle __SIGTHREADEXIT case. Don't just block rather than returning from this function. * sigproc.h (__SIGTHREADEXIT): New enum. (exit_thread): Declare. * sync.cc (muto::release): Accept a tls command-line argument. * sync.h (muto::release): Accept a tls command-line parameter. Default to &_my_tls. * cygerrno.h (__set_errno): Define as extern so that no function code is ever emitted. * cygserver_ipc.h (cygserver_ipc.h): Ditto. * miscfuncs.h (transform_chars): Ditto. * path.h (has_attribute): Ditto. * security.h (privilege_luid): Ditto. * winsup.h (flush_file_buffers): Ditto.
* * DevNotes: Add entry cgf-000018.Christopher Faylor2012-12-211-48/+1
| | | | | | | | | | | | | | * init.cc (dll_entry): Grab process lock before exiting to ensure that thread doesn't exit before parent if parent is exiting. * _cygtls.cc (_cygtls::call2): Revert previous 2012-12-21 change. * miscfuncs.cc (thread_wrapper): Ditto. * thread.cc (pthread::exit): Ditto. * sigproc.cc (exit_thread): Ditto. (wait_sig): Ditto. * sync.cc (muto::release): Ditto. * sync.h (muto::release): Ditto. * sigproc.h (__SIGTHREADEXIT): Delete enum. (exit_thread): Delete declaration.
* * DevNotes: Add entry cgf-000017.Christopher Faylor2012-12-211-1/+48
| | | | | | | | | | | | | | | | | | * _cygtls.cc (_cygtls::call2): Use new exit_thread function in place of ExitThread. * miscfuncs.cc (thread_wrapper): Ditto. * thread.cc (pthread::exit): Ditto. (pthread_mutex::unlock): Set tid to NULL rather than 0. (pthread_spinlock::unlock): Ditto. * pinfo.cc (commune_process): Actually call lock_process constructor. * sigproc.cc (exit_thread): New function. (wait_sig): Handle __SIGTHREADEXIT case. Don't just block rather than returning from this function. * sigproc.h (__SIGTHREADEXIT): New enum. (exit_thread): Declare. * sync.cc (muto::release): Accept a tls command-line argument. * sync.h (muto::release): Accept a tls command-line parameter. Default to &_my_tls.
* * sigproc.h (sig_send): Accept tid as argument #3. Default to NULL.Christopher Faylor2012-12-101-3/+3
| | | | | * sigproc.cc (sig_send): Ditto. Pass tid to other sig_send. (sigpending): Send current thread as arg #3.
* * sigproc.h (sigpacket): Remove parameter names from declarations.Christopher Faylor2012-12-071-5/+5
| | | | | | | | | (sigpacket::sigtls): Rename from 'tls'. * exceptions.cc (sigpacket::process): Define local tls variable and assign that to sigtls if appropriate. Clarify debugging output. * sigproc.cc (sig_send): Accommodate tls -> sigtls rename. (pending_signals::add): Ditto. (wait_sig): Ditto.
* * child_info.h (class child_info_spawn): Drop unused member lock.Corinna Vinschen2012-12-051-1/+0
| | | | | (CURR_CHILD_INFO_MAGIC): Update. * sigproc.cc (child_info_spawn::child_info_spawn): Drop setting lock.
* * sigproc.cc (proc_subproc): Delete unused variable child.Corinna Vinschen2012-11-081-1/+0
|