summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* * thread.cc (pthread_rwlock::lookup_reader): Remove parameter: always assumeChristopher Faylor2013-01-073-20/+29
| | | | | | | | | | | that we're looking for the current thread. (pthread_rwlock::tryrdlock): Eliminate self variable. Accommodate change in lookup_reader(). (pthread_rwlock::unlock): Ditto. (pthread_rwlock::rdlock): Ditto. Move add_reader call after writer tests to more closely mimic old behavior. (pthread_rwlock::wrlock): Accommodate change in lookup_reader(). * thread.h ((pthread_rwlock::lookup_reader): Eliminate argument.
* * thread.cc (pthread_rwlock::add_reader): Perform new operation here and returnChristopher Faylor2013-01-073-19/+27
| | | | | | | | pointer to allocated RWLOCK_READER structure. (pthread_rwlock::rdlock): Reorganize to reflect new add_reader functionality. (pthread_rwlock::tryrdlock): Ditto. Remove unneeded call to lookup_reader(). * thread.h (pthread_rwlock::RWLOCK_READER::RWLOCK_READER): New constructor. (pthread_rwlock::add_reader): Reflect new functionality.
* * globals.cc (exit_states): Renumber so that ES_EXIT_STARTING is first, asChristopher Faylor2013-01-043-2/+9
| | | | | | 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-032-1/+7
| | | | to an exiting thread.
* * sigproc.cc (no_signals_available): Remove exit_state test since signals areChristopher Faylor2013-01-032-16/+24
| | | | | | | | 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.
* update copyrightChristopher Faylor2013-01-021-1/+1
|
* * DevNotes: Add entry cgf-000020, relating to previous checkin.Christopher Faylor2013-01-022-1/+34
|
* * cygtls.h (_cygtls::signal_exit): Delete from class.Christopher Faylor2013-01-028-3280/+3262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-312-1/+4
|
* * dtable.cc (dtable::dup3): Fix bounds checking for valid newfd.Christopher Faylor2012-12-314-3/+8
| | | | | * syscalls.cc (dup2): Ditto. * winsup.h (events_terminate): Delete obsolete function declaration.
* * DevNotes: Add entry cgf-000019.Christopher Faylor2012-12-288-43/+117
| | | | | | | | | | | | | | | | | | | | | * 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.
* * fork.cc (child_info::prefork): Fix error message formatting.Christopher Faylor2012-12-272-1/+5
|
* Fix tid comment.Christopher Faylor2012-12-221-2/+2
|
* * select.h (select_stuff): Remove variable names from parameter declarations.Christopher Faylor2012-12-224-11/+55
| | | | | | | | | | | | | | | | (select_info): Ditto. (select_record::dump_select_record): Declare new debugging-only function. (select_info): Zero all fields. (select_pipe_info): Ditto. (select_socket_info): Ditto. (select_serial_info): Ditto. (select_mailslot_info): Ditto. * select.cc (select_record::dump_select_record): Define new debugging-only function. (select_stuff::test_and_set): Call dump_select_record when debugging. * thread.cc (pthread_mutex::unlock): Revert setting of tid to NULL since, in this context, it is a number, not a pointer. (pthread_spinlock::unlock): Ditto.
* Back out prematurely checked-in change.Christopher Faylor2012-12-221-2/+2
|
* * sigproc.cc (exit_thread): undef ExitThread or suffer recursion. Attempt toChristopher Faylor2012-12-223-4/+11
| | | | lock process prior to calling sig_send.
* Revert the reversion and go with implementation described in cgf-000017, withChristopher Faylor2012-12-2113-23/+93
| | | | | | | | | | | | | | | | | | | | | | 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-2110-61/+45
| | | | | | | | | | | | | | * 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-2110-13/+106
| | | | | | | | | | | | | | | | | | * _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.
* * pathnames.sgml (pathnames-at): Drop confusing description onCorinna Vinschen2012-12-202-1/+5
| | | | "embedded double quotes".
* * dcrt0.cc (build_argv): Allow quoted filenames in @ expression.Corinna Vinschen2012-12-202-1/+9
|
* Add missing file.Christopher Faylor2012-12-191-2/+2
|
* * select.h (select_stuff::select_stuff): Make default constructor always zeroChristopher Faylor2012-12-192-1/+8
| | | | | everything while constructor with int arg just zeroes next. * select.cc (select_stuff::test_and_set): Revert to using default constructor.
* * select.cc (select_stuff::wait): Add windows error number to error message.Christopher Faylor2012-12-192-1/+5
|
* * select.cc (select_stuff::test_and_set): Remove workaround and use properChristopher Faylor2012-12-182-1/+6
| | | | constructor.
* * select.cc (select_stuff::test_and_set): Work around problem of new() notChristopher Faylor2012-12-182-1/+6
| | | | returning zeroed memory.
* * utils.sgml (mount): Document sparse mount option.Corinna Vinschen2012-12-142-0/+6
|
* * new-features.sgml (ov-new1.7.18): Add sparse change.Corinna Vinschen2012-12-143-0/+14
| | | | * pathnames.sgml (mount-table): Document sparse mount option.
* *** empty log message ***Corinna Vinschen2012-12-141-0/+10
|
* * fhandler.cc (fhandler_base::write): Don't attempt to sparsifyCorinna Vinschen2012-12-146-12/+48
| | | | | | | | | | | | | | | | | an already sparse file. Drop check for FILE_SUPPORTS_SPARSE_FILES flag. Explicitely set FILE_ATTRIBUTE_SPARSE_FILE attribute in cached attributes. (fhandler_base::lseek): Only set did_lseek if sparseness is supported. * fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Don't attempt to sparsify an already sparse file. Explicitely set FILE_ATTRIBUTE_SPARSE_FILE attribute in cached attributes. * mount.cc (oopt): Add "sparse" flag. (fillout_mntent): Ditto. * path.h (enum path_types): Add PATH_SPARSE. (path_conv::support_sparse): New method. (path_conv::fs_flags): Constify. (path_conv::fs_name_len): Ditto. include/sys/mount.h: Replace unused MOUNT_MIXED flag with MOUNT_SPARSE.
* * sigproc.h (sig_send): Accept tid as argument #3. Default to NULL.Christopher Faylor2012-12-103-4/+10
| | | | | * sigproc.cc (sig_send): Ditto. Pass tid to other sig_send. (sigpending): Send current thread as arg #3.
* * exceptions.cc (sigpacket::process): Reorganize to avoid use of tls beforeChristopher Faylor2012-12-073-13/+25
| | | | | | 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-074-10/+24
| | | | | | | | | (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-074-4/+16
| | | | | | | 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.
* * new-features.sgml (ov-new1.7.18): New section. Document cfsetspeed.Yaakov Selkowitz2012-12-062-0/+16
|
* * include/cygwin/wait.h (WAIT_ANY): Define.Yaakov Selkowitz2012-12-062-0/+8
| | | | (WAIT_MYPGRP): Define.
* * child_info.h (class child_info_spawn): Drop unused member lock.Corinna Vinschen2012-12-053-3/+7
| | | | | (CURR_CHILD_INFO_MAGIC): Update. * sigproc.cc (child_info_spawn::child_info_spawn): Drop setting lock.
* * cygtls.h (_cygtls::will_wait_for_signal): Rename from 'signal_waiting' toChristopher Faylor2012-12-044-23/+31
| | | | | | | | | 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.
* revert erroneous checkinChristopher Faylor2012-11-303-122/+114
|
* * spawn.cc (child_info_spawn::worker): Make detection of '/c' case insensitiveChristopher Faylor2012-11-305-115/+128
| | | | when looking for cmd.exe command line.
* * Makefile.in: Remove old from CFLAGS and move C*FLAGS so that they can beChristopher Faylor2012-11-282-3/+9
| | | | manipulated by Makefile.common.
* * Makefile.in: Move CFLAGS and CXXFLAGS so that they can be manipulated byChristopher Faylor2012-11-283-11/+22
| | | | | | | | Makefile.common. Add -static-libstdc++ to *LDFLAGS. Add dependencies for loadlib.h. * loadlib.h: Update copyright. (_load_sys_library): Properly define set_dll_library as WINAPI to avoid stack corruption.
* * Makefile.in (ZLIBS): Common define to force static load.Christopher Faylor2012-11-272-3/+9
| | | | (MINGW_LDFLAGS): Use static libgcc.
* * Makefile.in: Make sure that libz is always loaded staticly.Christopher Faylor2012-11-272-2/+6
|
* * Makefile.in (Makefile): Rely on 'configure' not 'configure.in'.Christopher Faylor2012-11-262-1/+5
|
* ChangeLog:Christopher Faylor2012-11-2622-434/+456
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. cygserver/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. cygwin/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. doc/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. lsaauth/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. testsuite/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate. utils/ChangeLog: 2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx> * configure.ac: Rename from configure.in. * configure.in: Delete. * configure: Regenerate.
* * ccwrap: Don't drop mingw header file paths unless we've specified them withChristopher Faylor2012-11-262-2/+12
| | | | --with-windows-headers.
* * fhandler_registry.cc: Drop Mingw.org considerations.Corinna Vinschen2012-11-2610-128/+14
| | | | | | | | | | | * fhandler_serial.cc: Ditto. * fhandler_socket.cc: Ditto. * fhandler_tape.cc: Ditto. * fhandler_tty.cc: Ditto. * net.cc: Ditto. * ntdll.h: Ditto. * sched.cc: Ditto. * sec_helper.cc: Ditto.
* * bloda.cc: Drop Mingw.org considerations.Corinna Vinschen2012-11-264-26/+13
| | | | | * dump_setup.cc: Ditto. * strace.cc: Ditto.
* * transport_pipes.cc (pipe_instance_lock_once): Remove.Corinna Vinschen2012-11-262-33/+10
| | | | | | | | (pipe_instance_lock): Remove. (pipe_instance): Remove. (initialise_pipe_instance_lock): Remove. (transport_layer_pipes::accept): Drop entire pipe_instance handling. (transport_layer_pipes::close): Ditto.