summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* * exceptions.cc (signal_exit): Add a FIXME comment.Christopher Faylor2013-07-191-0/+2
|
* * exceptions.cc (signal_exit): Only dump core when it's a "kernel" signal.Christopher Faylor2013-07-191-2/+4
| | | | | Only use RtlCaptureContext on x86_64. It doesn't seem to do what's expected on x86.
* * exceptions.cc (try_to_debug): Don't use yield() when waiting for anotherChristopher Faylor2013-06-081-2/+6
| | | | | | process. (sigpacket::setup_handler): Fix long-standing problem where loop could exit with lock held.
* * cygwait.cc (cygwait): Remove lock around sig retrieval since this code isChristopher Faylor2013-06-081-32/+22
| | | | | | essentially guarded by thread-specific signal_arrived. * exceptions.cc (_cygtls::handle_SIGCONT): Simplify. Eliminate lock/unlock since code is guarded by signal_arrived.
* * exceptions.cc (_cygtls::handle_SIGCONT): Reinstate previous behavior but makeChristopher Faylor2013-06-071-10/+24
| | | | sure that yield() isn't called when signal stack is locked.
* * exceptions.cc (exception::handle): Add comment explaining si_addr behavior.Christopher Faylor2013-06-071-6/+9
|
* * exceptions.cc (_cygtls::handle_SIGCONT): Simplify loop waiting forCorinna Vinschen2013-06-061-17/+10
| | | | | | | sig_handle_tty_stop to wake up. Make sure to unlock before calling yield to avoid starvation of sig_handle_tty_stop. Add comments. * miscfuncs.cc (yield): Explain why yield should never be called under _cygtls::lock conditions. Call SleepEx with 1ms timeout. Explain why.
* * exceptions.cc (exception::handle): Resurrect accidentally lostCorinna Vinschen2013-06-021-1/+2
| | | | patch from 2009-07-22: Set si_addr according to POSIX for SIGSEGV.
* * exceptions.cc (cygwin_exception::dumpstack): Guard against wild pointerChristopher Faylor2013-04-301-22/+29
| | | | | | | | dereference. (CYG_EXC_CONTINUE_EXECUTION): Define based on standard Windows definition. (CYG_EXC_CONTINUE_SEARCH): Ditto. (exception::handle): Move andreas detection earlier. Make comment clearer. (signal_exit): Set core-dumped flag.
* * Merge in cygwin-64bit-branch.Corinna Vinschen2013-04-231-91/+218
|
* * cygtls.h (_cygtls::reset_signal_arrived): Actually reset the signal_arrivedChristopher Faylor2013-04-091-42/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-28/+37
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* * exceptions.cc (exception::handle): Generalize comment.Christopher Faylor2013-03-281-1/+1
|
* * cygtls.h (_cygtls::signal_debugger): Change argument type.Christopher Faylor2013-03-091-22/+31
| | | | | | | | | (_cygtls::copy_context): Delete declaration. * exceptions.cc (exception::handle): Don't call copy_context() here. Move signal_handler call earlier and always call it. (_cygtls::copy_context): Delete definition. (_cygtls::signal_debugger): Move copy_context logic here. Suspend thread receiving signal before gathering context information.
* Remove now-inappropriate comment.Christopher Faylor2013-03-011-2/+0
|
* * exceptions.cc (exception::handle): Eliminate buggy recursed value and justChristopher Faylor2013-03-011-3/+3
| | | | check if we're exiting.
* * DevNotes: Add entry cgf-000022.Christopher Faylor2013-01-311-32/+14
| | | | | | | | | | | | | | | | | | | | | | * cygtls.h (_cygtls::func): Define as a sa_sigaction style function. * exceptions.cc (sig_handle_tty_stop): Ditto. (_cygtls::interrupt_setup): Fix coercion to accommodate 'func' change. (ctrl_c_handler): Use tty kill_pgrp to send a signal. (sigpacket::process): Don't process sigflush here. (_cygtls::call_signal_handler): Reorganize to avoid a race. Always call sa_sigaction style function. * fhandler_termios.cc (is_flush_sig): Define new function. (tty_min::kill_pgrp): Handle tty flush when signal detected. (fhandler_termios::bg_check): Be slightly more paranoid about checking for valid tty. (fhandler_termios::sigflush): Don't flush unless tty owner. * fhandler_tty.cc (fhandler_pty_slave::ioctl): Use tty kill_pgrp to send signal. (fhandler_pty_master::ioctl): Ditto. * signal.cc (killsys): Delete definition. * sigproc.h (killsys): Delete declaration. * include/cygwin/signal.h (siginfo_t): Simplify union/struct nesting slightly. Implement mechanism to allow cygwin data passing.
* * exceptions.cc (exception::handle): Make attempt to recursively dump stackChristopher Faylor2013-01-231-1/+1
| | | | fatal.
* * dcrt0.cc (dll_crt0_1): Comment assumption.Christopher Faylor2013-01-211-0/+4
| | | | | * exceptions.cc (sigpacket::setup_handler): Avoid sending signals during fork processing.
* Throughout, change __attribute__ ((regparm (N))) to just __regN. Throughout,Christopher Faylor2013-01-211-3/+3
| | | | | | | | | | | | | | | | | | | (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.
* * exceptions.cc (ctrl_c_handler): Remove special-case handler forChristopher Faylor2013-01-191-8/+0
| | | | | | "cygwin_finished_initializing". * sigproc.cc (exit_thread): Undefine ExitThread earlier to avoid recursion on error return.
* * exceptions.cc (signal_exit): Move captive process termintation...Christopher Faylor2013-01-141-10/+8
| | | | | | | | | | | | | | | | (_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.
* * cygerrno.h: Fix copyright.Corinna Vinschen2013-01-091-2/+0
| | | | * exceptions.cc: Drop comment explaining removed variable.
* * cygtls.h (_cygtls::signal_exit): Delete from class.Christopher Faylor2013-01-021-87/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * DevNotes: Add entry cgf-000019.Christopher Faylor2012-12-281-13/+6
| | | | | | | | | | | | | | | | | | | | | * 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.
* * exceptions.cc (sigpacket::process): Reorganize to avoid use of tls beforeChristopher Faylor2012-12-071-12/+12
| | | | | | initialization. * fhandler_fifo.cc (fhandler_fifo::arm): Avoid improper printing of integer as a string in debug output.
* * sigproc.h (sigpacket): Remove parameter names from declarations.Christopher Faylor2012-12-071-2/+6
| | | | | | | | | (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.
* * cygtls.h (_cygtls::get_signal_arrived): Add parameter to make lock/unlockChristopher Faylor2012-12-071-1/+1
| | | | | | | conditional. * exceptions.cc (_cygtls::interrupt_setup): Don't get a lock when setting signal_arrived since we already have one. * gendef: Add some comments to make it easier to find functions.
* * cygtls.h (_cygtls::will_wait_for_signal): Rename from 'signal_waiting' toChristopher Faylor2012-12-041-5/+1
| | | | | | | | | something more expressive. Reflect rename throughout. (_cygtls::get_signal_arrived): Rename from create_signal_arrived. Move lock here. (_cygtls::set_signal_arrived): Use get_signal_arrived. * exceptions.cc (_cygtls::interrupt_setup): Use get_signal_arrived. * tlsoffsets.h: Regenerate.
* * DevNotes: Add entry cgf-000016.Christopher Faylor2012-08-171-15/+13
| | | | | | | | | | | | | | | | | | * cygtls.h (_cygtls::push): Inline. (_cygtls::interrupt_now): Change signal number argument to siginfo_t argument. (_cygtls::interrupt_setup): Ditto. (_cygtls::set_siginfo): Delete declaration. (_cygtls::reset_signal_arrived): Don't reset signal_arrived signal. Just reset flag. * exceptions.cc (_cygtls::interrupt_now): Reflect argument changes. Pass si to interrupt_setup. (_cygtls::interrupt_setup): Reflect argument changes. Fill out tls infodata here using passed-in si. Use si.si_signo instead of sig. (sigpacket::setup_handler): Move this function into sigpacket class. Use si field from the class as appropriate. (sigpacket::process): Don't call tls->set_siginfo here since setup_handler could fail. Eliminate now-unneeded sig argument. * sigproc.h (sigpacket::setup_handler): Move setup_handler to this class.
* * exceptions.cc (sig_handle_tty_stop): Clear tls sig field.Christopher Faylor2012-08-171-1/+5
| | | | | (sigpacket::process): When continuing, set tls->sig before arming signal_arrived.
* * cygheap.cc (init_cygheap::find_tls): Don't consider unitialized threads.Christopher Faylor2012-08-161-21/+25
| | | | | | * cygtls.cc (_cygtls::operator HANDLE): Return NULL when tid is not set. * exceptions.cc (setup_handler): Don't try to suspend a thread if it has no handle.
* Rename cancelable_wait -> cygwait throughout.Christopher Faylor2012-08-151-2/+2
| | | | | * DevNotes: Add entry cgf-000015. * cygwait.h (cygwait): Don't allow an optional PLARGE_INTERGER argument.
* * cygtls.h (_cygtls::create_signal_arrived): New function.Christopher Faylor2012-08-151-2/+6
| | | | | | | | (_cygtls::set_signal_arrived): Lock creation of signal_arrived. * cygwait.cc (cancelable_wait): Ignore signal_arrived event if _my_tls 'sig' element does not exist. * exceptions.cc (_cygtls::interrupt_setup): Create signal_arrived if recipient thread has not created it.
* * exceptions.cc (sigdelayed): Move declaration to sigproc.h.Christopher Faylor2012-08-151-2/+0
| | | | | | | * sigproc.h (sigdelayed): Make symbol globally available. * gendef (sigdelayed): Specifically zero incyg and stacklock. * signal.cc (sigwaitinfo): Lock _my_tls and try harder to clean up signal information.
* * DevNotes: Add entry cgf-000014.Christopher Faylor2012-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * cygheap.cc (tls_sentry): Move here, rename from 'sentry' in cygtls.cc (tls_sentry::lock): Ditto. (nthreads): Move from cygtls.cc (THREADLIST_CHUNK): Ditto. (cygheap_init): Call init_tls_list(). (init_cygheap::init_tls_list): Define new function. (init_cygheap::add_tls): Ditto. (init_cygheap::remove_tls): Ditto. (init_cygheap::find_tls): Ditto. Semi-resurrect from _cygtls::find_tls. * cygheap.h (init_cygheap::init_tls_list): Declare new function. (init_cygheap::add_tls): Ditto. (init_cygheap::remove_tls): Ditto. (init_cygheap::find_tls): Ditto. * cygtls.cc (sentry): Delete. (sentry::lock): Ditto. (nthreads): Ditto. (THREADLIST_CHUNK): Ditto. (_cygtls::init): Delete definition. (_cygtls::init_thread): Call cygheap->add_tls() to add thread to global list. (_cygtls::remove): cygheap->remove_tls() to remove thread from global list. * cygtls.h (_cygtls::init): Delete declaration. * dcrt0.cc (dll_crt0_0): Delete call to _cygtls::init(). * exceptions.cc (sigpacket::process): When no thread is specified, try to find one via cygheap->find_tls.
* * exceptions.cc (sigdelayed): Simplify declaration.Christopher Faylor2012-08-031-5/+5
| | | | | (_cygtls::call_signal_handler): Fix test for when to pop signal stack. Only do it exactly when what is on the stack is a no-op.
* * cygwait.cc (cancelable_wait): Add some debugging-only output.Christopher Faylor2012-07-301-33/+33
| | | | | | | | | | | | | | | | | | | | * exceptions.cc (sig_handle_tty_stop): Make sure that incyg is cleared when exiting if we have no parent process. Only wait for signal_arrived. (sigpacket::process): Make continue_now a bool. Delay sending signal_arrived until the end. Make code more defensive to avoid calling signal handler when stopped. Only set signal_arrived when stopped. * sigproc.cc (sig_hold): Rename from sigCONT. Make static. (sig_send): Accommodate sigCONT -> sig_hold rename. (wait_sig): Ditto. * sigproc.h (sigCONT): Delete declaration. * fhandler_console.cc (fhandler_console::write): Use new '%0c' facility to print characters. Change to paranoid to avoid excessive strace output. * fhandler_tty.cc (fhandler_pty_master::accept_input): Make frequent strace printf "paranoid" to help cut down on strace output size. * signal.cc (sigsuspend): Add standard syscall strace output. (sigpause): Ditto. (pause): Ditto. * cygtls.h (_cygtls::reset_signal_arrived): New function.
* * cygtls.cc (_cygtls::reset_signal_arrived): New function.Christopher Faylor2012-07-291-8/+11
| | | | | | | | | | | | | | | (set_signal_arrived::~set_signal_arrived): Use reset_signal_arrived to reset state. * exceptions.cc (sig_handle_tty_stop): Use WAIT_SIGNALED rather than assume we know the return from cancelable_wait. (_cygtls::interrupt_setup): Modify to allow calling when executing in non-cygwin code via sigdelayed. Always reset signal_arrived. * gendef: Throughout use start_offset rather than the completely wrong sizeof__cygtls. (_sigdelayed): Rewrite to avoid duplication when calling the signal handler. (sigreturn): Delete. * gentls_offsets: Define start_offset rather than sizeof__cygtls. * tlsoffsets.h: Regenerate.
* * DevNotes: Add entry cgf-000013.Christopher Faylor2012-07-211-119/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygserver_ipc.h (ipc_set_proc_info): Use _cygtls::ipc_set_proc_info to set per-thread signal arrived value. * cygthread.cc (cygthread::detach): Use per-thread signal_arrived via set_thread_waiting. * fork.cc (_cygtls::fixup_after_fork): Clear signal_arrived. (_cygtls::remove): Close any signal_arrived handle when thread exists. (_cygtls::find_tls): Remove unneeded function. * cygtls.h: Update copyright. (class _cygtls): Reorganize to help avoid rebuilding newlib when structure changes. (_cygtls::event): Delete. (_cygtls::threadkill): Ditto. (_cygtls::signal_waiting): Declare new bool. (_cygtls::find_tls): Delete declaration. (_cygtls::set_threadkill): Ditto. (_cygtls::reset_threadkill): Ditto. (_cygtls::set_signal_arrived): Declare new function. (class set_thread_waiting): Declare new class. * cygwait.cc (cw_nowait_storage): Define. (cygwait): Set per-thread signal_arrived via set_thread_waiting. Don't special-case _main_tls. * cygwait.h (cw_nowait): Define. (cw_infinite): Ditto. (cygwait): Redefine pathological wait-only case. * dcrt0.cc (dll_crt0_0): Remove call to now-defunct events_init(). (dll_crt0_1): Remove call to now-defunct create_signal_arrived(). * exceptions.cc: Reflect set_signal_mask() argument reordering throughout. Remove signal mask synchronization throughout. (events_init): Delete definition. (mask_sync): Delete now-unneeded mask synchronization. (set_signal_mask): Reverse order of arguments to "standard" to, from layout. Rename "newmask" argument to "setmask". Remove debugging. (sig_handle_tty_stop): Use cancelable_wait rather than WFMO. (_cygtls::interrupt_setup): Don't treat "threadkill" events specially. Conditionally set signal_arrived depending on whether the thread has created it or not. (sigpacket::process): Reorganize to reflect thread-specific sending of signals which is more in line with the way it was actually supposed to work. * fhandler_socket.cc (get_inet_addr): Use cancelable_wait rather than IsEventSignalled to avoid potential race. (fhandler_socket::wait_for_events): Set signal_arrived event using set_thread_waiting(). (fhandler_socket::close): Use cygwait for the case of just waiting 10 ms for a signal. * fhandler_tape.cc (fhandler_dev_tape::_lock): Use cancelable_wait rather than WFMO. Redo switch/case tests accordingly. * fhandler_termios.cc (fhandler_termios::bg_check): Use cygwait for case of just waiting 0 ms for a potential signal. * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Use cancelable_wait rather than WFSO. * fhandler_windows.cc (fhandler_windows::read): Set per-thread signal_arrived via set_thread_waiting(). * flock.cc (lf_setlock): Ditto. * select.cc (pselect): Ditto. Set per-thread signal_arrived using set_thread_waiting(). * gendef: Don't special case handling of _cygtls::sig for threads. * gentls_offsets: Use #pragma once in tlsoffsets.h. * ntdll.h: Use #pragma once. * poll.cc: Reflect set_signal_mask() argument reordering. * posix_ipc.cc (ipc_mutex_lock): Use cancelable_wait rather than WFMO. (ipc_cond_timedwait): Set perl-thread signal arrived using set_thread_waiting(). * security.h: Use #pragma once. * signal.cc (abort): Reflect set_signal_mask() argument reordering. (clock_nanosleep): Ditto. Change call to cancelable_wait to properly specify handling of cancel and interrupt. (sigwaitinfo): Remove handling of per-thread event in favor of per-thread signal_arrived. Use cancelable_wait rather than WFSO. * sigproc.cc (signal_arrived): Delete definition. (create_signal_arrived): Ditto. * sigproc.h (signal_arrived): Delete declaration. (set_signal_mask): Avoid defining as a "C" function. Don't conditionally declare. (create_signal_arrived): Delete declaration. * syscalls.cc (rename): Use cygwait() rather than WFSO. * thread.h (fast_mutex::lock): Use cw_infinite rather than LARGE_NULL. * wait.cc (wait4): Ditto. * thread.cc (pthread_mutex::lock): Ditto. (pthread::join): Ditto. (semaphore::_wait): Ditto. (pthread_kill): Remove set_threadkill() accommodation. * tlsoffsets.h: Regenerate.
* * exceptions.cc (setup_handler): Remove unneeded assignment found by Clang.Christopher Faylor2012-07-041-1/+1
|
* * exceptions.cc (exception::handle): Use error_code in klog, as intended.Christopher Faylor2012-07-031-2/+1
| | | | Found by Clang.
* * Makefile.in: Add some more optimization flags for cygwait, malloc and ↵Christopher Faylor2012-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | path. Explain why -fomit-frame-pointer doesn't work right for passwd.o and path.o. Add -static to link command line for cygwin0.dll. * fhandler_disk_file.cc (fhandler_disk_file::facl): Reorganize slightly to silence compiler warning when compiling with -fstack-check. * net.cc (inet_ntop6): Initialize structure members to silence compiler warning when compiling with -fstack-check. * pseudo-reloc.cc (_pei386_runtime_relocator): Make this a C function. Detect NULL u. * winsup.h (_pei386_runtime_relocator): Declare this as extern "C". * lib/_cygwin_crt0_common.cc (_pei386_runtime_relocator): Call with NULL argument. * signal.cc (sigaction_worker): Eliminate last argument. Let callers report their own strace info. Regparmize. (sigaction): Reflect sigaction_worker changes. (siginterrupt): Ditto. * exceptions.cc: Update copyright.
* * exceptions.cc (RtlUnwind): Align declaration with MSDN.Corinna Vinschen2012-06-281-1/+1
| | | | | * ntdll.h: Define CreateDisposition Flags. Add comments. * winlean.h: Define FILE_SHARE_VALID_FLAGS if using Mingw64 headers.
* * exceptions.cc (exception::handle): Cast exception code to NTSTATUSCorinna Vinschen2012-06-271-1/+1
| | | | | | for comparison. * ntdll.h: Drop defining NT status codes in favor of including ntstatus.h.
* * cygwait.h (LARGE_NULL): Define.Christopher Faylor2012-06-191-1/+1
| | | | | | | | | | | | | | (cancelable_wait): Define variant which accepts DWORD time argument. (cygwait): Use cancelable_wait with DWORD argument. (cygwait): Use cancelable_wait with DWORD argument and cw_sig_eintr for timeout-only case. * exceptions.cc (handle_sigsuspend): Use LARGE_NULL as second argument to distinguish between cancelable_wait variants. * thread.cc (pthread_mutex::lock): Ditto. (pthread::join): Ditto. (semaphore::_timedwait): Ditto. * thread.h (fast_mutex::lock): Ditto. * wait.cc (wait4): Ditto.
* Revert errneous checkin.Christopher Faylor2012-06-191-3/+4
| | | | Check in actual change associated with ChangeLog.
* * cygwait.cc (cancelable_wait): Mimic old cygwait behavior more closely wrtChristopher Faylor2012-06-191-4/+3
| | | | | | | | handling of call_signal_handler. * cygwait.h (WAIT_CANCELED): Move here and redefine. (WAIT_SIGNALED): Ditto. * thread.h (WAIT_CANCELED): Delete. (WAIT_SIGNALED): Ditto.
* Add '#include "cygwait.h"' throughout, where appropriate.Christopher Faylor2012-06-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * DevNotes: Add entry cgf-000012. * Makefile.in (DLL_OFILES): Add cygwait.o. * sigproc.h: Remove cygwait definitions. * cygwait.h: New file. Define/declare Cygwin waitfor functions. * cygwait.cc: Ditto. * exceptions.cc: Include cygwait.h. (handle_sigsuspend): Accommodate change in cancelable_wait arguments. (sigpacket::process): Display thread tls in debugging output. * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use symbolic names for signal and cancel return. * fhandler_console.cc (fhandler_console::read): Ditto. (fhandler_dev_dsp::Audio_out::waitforspace): Ditto. fhandler_dev_dsp::Audio_in::waitfordata): Ditto. * fhandler_fifo.cc (fhandler_fifo::wait): Ditto. * fhandler_serial.cc (fhandler_serial::raw_read): Ditto. * fhandler_tty.cc (fhandler_pty_slave::read): Ditto. * select.cc (cygwin_select): Ditto. * wait.cc (wait4): Ditto. * thread.cc (cancelable_wait): Move definition to cygwait.h. (pthread_cond::wait): Accommodate change in cancelable_wait arguments. (pthread_mutex::lock): Ditto. (pthread_spinlock::lock): Ditto. (pthread::join): Ditto. (pthread::thread_init_wrapper): Display tls in debugging output. (semaphore::_timedwait): Ditto. * thread.h (cw_sig_wait): Move to cygwait.h. (cw_cancel_action): Delete. (cancelable_wait): Move declaration to cygwait.h.
* * exceptions.cc (setup_handler): Make debugging output a little more verbose.Christopher Faylor2012-06-031-1/+1
|