Commit Graph

14366 Commits

Author SHA1 Message Date
Christopher Faylor 978441cc0e * cygwait.h (LARGE_NULL): Define.
(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.
2012-06-19 00:52:59 +00:00
Christopher Faylor 2addde8cb1 Revert errneous checkin.
Check in actual change associated with ChangeLog.
2012-06-19 00:38:02 +00:00
Christopher Faylor af5cd14583 * cygwait.cc (cancelable_wait): Mimic old cygwait behavior more closely wrt
handling of call_signal_handler.
* cygwait.h (WAIT_CANCELED): Move here and redefine.
(WAIT_SIGNALED): Ditto.
* thread.h (WAIT_CANCELED): Delete.
(WAIT_SIGNALED): Ditto.
2012-06-19 00:31:15 +00:00
DJ Delorie 88fbcb5afd merge from gcc 2012-06-19 00:03:49 +00:00
Corinna Vinschen 099817c3db * cygheap.cc (init_cygheap::init_installation_root): Rearrange code
creating valid native NT installation_root path.  Only strip last
	backslash from path if the result is a valid NT path.  Explain why.
2012-06-18 20:17:15 +00:00
Christopher Faylor 4ae6378382 Add '#include "cygwait.h"' throughout, where appropriate.
* 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.
2012-06-17 20:50:24 +00:00
Rafael Ávila de Espíndola d66ef282c2 2012-06-12 Rafael Ávila de Espíndola <respindola@mozilla.com>
* plugin-api.h (ld_plugin_output_file_type): Add LDPO_PIE.
2012-06-12 22:50:44 +00:00
Yaakov Selkowitz 933ee0ecbf Fix last ChangeLog entry. 2012-06-12 18:34:38 +00:00
Yaakov Selkowitz 3e5a48af5e * regex/regcomp.c (p_ere): Allow vertical-line following
left-parenthesis in ERE, as in glibc.
2012-06-11 22:15:27 +00:00
Yaakov Selkowitz 53943a2e87 * include/sys/elf_common.h (R_386_16): Define.
(R_386_PC16): Define.
	(R_386_8): Define.
	(R_386_PC8): Define.
2012-06-10 18:28:16 +00:00
Christopher Faylor abf1b60039 * select.cc (cygwin_select): Remove select_timeout test.
(select_stuff::wait): Return select_set_zero on timeout.
(thread_socket): Report timeout when debugging.
2012-06-10 01:57:53 +00:00
DJ Delorie 3791ab4cd5 merge from gcc 2012-06-08 19:01:23 +00:00
Nick Clifton 275f225520 * avr.h: (AVR_ISA_XCH): New define.
(AVR_ISA_XMEGA): Use it.
	(XCH, LAS, LAT, LAC): New XMEGA opcodes.
2012-06-07 16:43:36 +00:00
Yaakov Selkowitz f513e3a206 * include/elf.h: Update from FreeBSD.
* include/machine/elf.h: New header, from FreeBSD.
	* include/sys/elf.h: Ditto.
	* include/sys/elf32.h: Update from FreeBSD.
	* include/sys/elf64.h: Ditto.
	* include/sys/elf_common.h: Ditto.
	(R_IA64_*): Define Linux-style names as aliases to R_IA_64_*.
	(R_SH_*): Define, based on sh-4 psABI.
	(R_390_*): Define, based on s390x psABI.
	* include/sys/elf_generic.h: Ditto.
2012-06-06 04:45:48 +00:00
Corinna Vinschen 8336af85e9 * libc/stdio/findfp.c (__sinit): Avoid infinite recursion on
_REENT_SMALL targets.  Add comment to explain.
2012-06-05 16:17:16 +00:00
Corinna Vinschen cd69beda67 * fhandler_disk_file.cc (fhandler_disk_file::link ): Translate
STATUS_NOT_SUPPORTED to EPERM as well.
2012-06-04 08:49:13 +00:00
Christopher Faylor b9c61a8d7b * dtable.cc (dtable::dup3): Only return with lock set when O_EXCL flag is
passed in.
* syscalls.cc (dup_finish): Pass O_EXCL in flags to dtable::dup3.
2012-06-04 01:26:05 +00:00
Christopher Faylor 3143cb7c00 * DevNotes: Add entry cgf-000011.
* fhandler.h (fhandler_base::refcnt): Delete.
(fhandler_base::inc_refcnt): New function.
(fhandler_base::dec_refcnt): New function.
* cygheap.h (cygheap_fdnew::~cygheap_fdnew): Accommodate split of refcnt to
inc_refcnt/dec_refcnt.
(cygheap_fdget::cygheap_fdget): Ditto.
(cygheap_fdget::~cygheap_fdget::cygheap_fdget): Ditto.
* dtable.cc (dtable::release): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::init_std_file_from_handle): Ditto.
(dtable::dup3): On success, return with fdtab locked.
* dtable.h (dtable): Add dup_finish as a friend.
* syscalls.cc (dup_finish): Define new function.  Increment refcnt while fdtab
is locked.
(dup2): Use common dup_finish() to perform dup operation.
(dup3): Ditto.
2012-06-03 18:02:45 +00:00
Corinna Vinschen ff80d22a7c * new-features.sgml (ov-new1.7.16): Document ReFS support. 2012-06-03 16:53:03 +00:00
Corinna Vinschen ba9846ad9b *** empty log message *** 2012-06-03 16:47:57 +00:00
Corinna Vinschen 115d74b99e * globals.cc (ro_u_refs): New R/O unicode string.
* mount.cc (fs_info::update): Recognize ReFS.
	* mount.h (enum fs_info_type): Add refs.
	(class fs_info): Add refs flag and accessor methods.
	* ntdll.h (RtlAddAccessAllowedAceEx): Declare.
	(RtlAddAccessDeniedAceEx): Declare.
	* path.h (path_conv::fs_is_refs): Define.
	* sec_helper.cc (_recycler_sd): New function to create security
	descriptors suitable for the recycler bin starting with Vista.
	* security.cc (add_access_allowed_ace): Use RtlAddAccessAllowedAceEx
	and drop code to set AceFlags explicitely.
	(add_access_denied_ace): Use RtlAddAccessDeniedAceEx and drop code to
	set AceFlags explicitely.
	* security.h (_recycler_sd): Declare.
	(recycler_sd): Define.
	* syscalls.cc (desktop_ini): Change formatting.
	(desktop_ini_ext): Define third line of recycler desktop.ini file
	since Vista,
	(try_to_bin): Handle ReFS just like NTFS.  Write Vista and later
	Recycler in all uppercase, just like shell32 does when recreating it.
	Fix comments to include ReFS.  Don't implicitely reuse object
	attributes from earlier NtOpenFile call, rather recreate it for safety.
	Use recycler_sd call when creating security descriptor for Recycler
	dirs and files on Vista and later.  Write third line of desktop.ini
	when on Vista and later.
2012-06-03 16:46:53 +00:00
Corinna Vinschen 6a713dabad * cygcheck.cc (dump_sysinfo): Change "Server 8" to official
"Server 2012".
2012-06-03 16:45:27 +00:00
Christopher Faylor b7ae842aea * winbase.h: Add missing copyright date. 2012-06-03 16:32:00 +00:00
Christopher Faylor 7c15768aa5 * select.cc (cygwin_select): Make sure that we only return -1 as an error
return.
(select_stuff::wait): Semi-revert to previous method for filling out w4.
2012-06-03 16:31:33 +00:00
Christopher Faylor 00a3124325 * select.cc (cygwin_select): Add some comments.
(select_stuff::wait): Ditto.
2012-06-03 03:29:47 +00:00
Christopher Faylor 45b61a88be * DevNotes: Add entry cgf-000010.
* select.cc (set_handle_or_return_if_not_open): Remove unneeded final backslash
from definition.
(cygwin_select): Reorganize to incorporate outer retry loop.  Move remaining
time recalculation here for retry case.  Use select_stuff::wait_states for loop
control.
(select_stuff::cleanup): Avoid unneeded initialization.
(select_stuff::wait): Modify definition to return select_stuff::wait_states.
Eliminate is_cancelable.  Don't element 1 of an array if it is a cancel handle.
Remove loop.  Rely on being called from enclosing loop in cygwin_select.
Remove time recalculation when restarting.  Try harder to always return from
the bottom.
* select.h (select_stuff::wait_state): New enum.
(select_stuff::wait): Modify declaration to return select_stuff::wait_states.
2012-06-03 02:59:20 +00:00
Christopher Faylor faab45455a * exceptions.cc (setup_handler): Make debugging output a little more verbose. 2012-06-03 02:26:58 +00:00
Christopher Faylor 841ab2f971 * cygtls.h (_cygtls::protect_linked_list): Delete unused field. 2012-06-02 20:28:57 +00:00
Corinna Vinschen d5eb5ee3a0 Fix typo. 2012-05-31 09:18:58 +00:00
Corinna Vinschen 94c837599c * libc/stdio/local.h (_newlib_sfp_lock_exit): Fix typo in non-pthread
version.
2012-05-31 07:33:59 +00:00
Corinna Vinschen 53bbfeed98 * libc/stdio/fgetws.c (_fgetws_r): Call _mbsnrtowcs_r rather than
_mbsrtowcs_r and restrict number of wide chars to n - 1.
2012-05-30 14:42:52 +00:00
Corinna Vinschen 0b592aeef2 * hookapi.cc (find_first_notloaded_dll): Extend comment. Fix usage of
mapped memory.  Shorten static library name buffer to MAX_PATH.  Use
	strlcpy to copy library name to buffer.  Only Unmap "map" if it has been
	Mapped before.
	* pinfo.cc (status_exit): Drop unneeded declaration of
	find_first_notloaded_dll in favor of the declaration in winsup.h.
2012-05-30 14:37:53 +00:00
Corinna Vinschen 52174bb4cc * thread.cc: Remove temporary newlib workaround, now that newlib
handles thread cancellation by itself.
	(class __cygwin_lock_handler): Remove.
	(__cygwin_lock_cleanup): Remove.
	(__cygwin_lock_lock): Revert newlib workaround,
	(__cygwin_lock_trylock): Ditto.
	(__cygwin_lock_unlock): Ditto.
	(pthread::pop_cleanup_handler): Ditto.
2012-05-30 09:15:38 +00:00
Corinna Vinschen 4aa28d8ae2 * libc/stdio/local.h (_newlib_flockfile_start): New macro to
secure stream related critical section against thread cancellation.
	(_newlib_flockfile_exit): Ditto.
	(_newlib_sfp_lock_end): Ditto.
	(_newlib_sfp_lock_start): Ditto for the list of streams.
	(_newlib_sfp_lock_exit): Ditto.
	(_newlib_sfp_lock_end): Ditto.
	Use aforementioned macros in place of _flockfile/_funlockfile
	and __sfp_lock_acquire/__sfp_lock_release throughout the code.
	* libc/stdio/fclose.c: Explicitely disable and re-enable thread
	cancellation.  Explain why.
	* libc/stdio/freopen.c: Ditto.
	* libc/stdio64/freopen64.c: Ditto.
2012-05-30 08:58:42 +00:00
Joseph Myers 75b6133098 Resync config/ from GCC. 2012-05-29 15:58:15 +00:00
Corinna Vinschen d6719f7e17 * select.cc (select_stuff::wait): Temporarily disable restarting
entirely.
2012-05-29 13:11:34 +00:00
Corinna Vinschen d560c4b2ba * security.h (cygsidlist::+=): Correctly copy well_known_sid info from
source cygsid.
2012-05-29 13:01:50 +00:00
Corinna Vinschen 00ef94f338 * Makefile.in (LIBS): Re-add advapi32.dll. Explain why.
* make-64bit-version-with-mingw-w64.sh (LIBS): Ditto.
	* cyglsa.c: Drop NTDLL function declarations.  Use equivalent advapi32
	functions again, throughout.
	* cyglsa64.dll: Regenerate.
2012-05-29 12:46:01 +00:00
Corinna Vinschen d610936513 * registry.cc (reg_key::build_reg): Fix typo in debug output. 2012-05-25 14:49:56 +00:00
Corinna Vinschen 8e599b1e3a * select.cc (select_stuff::wait): When not returning after receiving
a signal, recalculate timeout.  Apply temporary fix to avoid crashes
	after calling the signal handler.  Explain.
2012-05-25 14:33:18 +00:00
Corinna Vinschen df5cda0e93 * fhandler_serial.cc (fhandler_serial::raw_read): Check for
ERROR_OPERATION_ABORTED rather than ERROR_IO_INCOMPLETE after CancelIo.
2012-05-25 11:08:10 +00:00
Corinna Vinschen 96d5b7d17c * fhandler_serial.cc (fhandler_serial::raw_read): Just call ReadFile
directly in case of non-blocking I/O and handle result gracefully.
2012-05-25 09:29:17 +00:00
Pedro Alves 79f6dbe171 gdb/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

gdb/gdbserver/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

include/gdb/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        * gdb/signals.def: Replace TARGET_SIGNAL_ with GDB_SIGNAL_
	throughout.

sim/arm/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/avr/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/common/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/cr16/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/d10v/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/erc32/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/m32c/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/ppc/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/rl78/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.

sim/rx/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

        Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2012-05-24 16:51:39 +00:00
Pedro Alves 454b03461d gdb/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

	Replace target_signal with gdb_signal throughout.

gdb/gdbserver/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

	Replace target_signal with gdb_signal throughout.

include/gdb/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

	Replace target_signal with gdb_signal throughout.

sim/common/
2012-05-24  Pedro Alves  <palves@redhat.com>

	PR gdb/7205

	Replace target_signal with gdb_signal throughout.
2012-05-24 16:39:13 +00:00
Corinna Vinschen 32c02f191b * thread.cc (__cygwin_lock_lock): Replace null thread check with test
for cygwin_finished_initializing to handle process startup.
	(__cygwin_lock_trylock): Ditto.
	(__cygwin_lock_unlock): Ditto.
2012-05-24 14:17:51 +00:00
Doug Evans a7a7311974 * leb128.h: #include stdint.h, inttypes.h.
(read_uleb128_to_uint64): Renamed from read_uleb128_to_ull.
	Change to take a uint64_t * argument instead of unsigned long long.
	(read_sleb128_to_uint64): Renamed from read_sleb128_to_ll.
	Change to take an int64_t * argument instead of long long.
2012-05-24 01:18:15 +00:00
Corinna Vinschen 9cbf10a06e * thread.cc (__cygwin_lock_lock): Take null thread at process startup
into account.
	(__cygwin_lock_trylock): Ditto.
	(__cygwin_lock_unlock): Ditto.
2012-05-23 19:49:39 +00:00
Corinna Vinschen 2b165a453e * thread.cc (pthread::cancel): Re-allow asynchronous cancellation from
Cygwin code since it looks like the problem is Windows only.
2012-05-23 17:39:39 +00:00
Corinna Vinschen bff08077a6 * thread.cc: Add a temporary workaround to help Cygwin along while
newlib doesn't install cleanup handlers.  Explain the problem.
	(class __cygwin_lock_handler): New class.
	(__cygwin_lock_cleanup): New function.
	(__cygwin_lock_lock): Push __cygwin_lock_cleanup thread cleanup
	handler.
	(__cygwin_lock_trylock): Ditto.
	(__cygwin_lock_unlock): Pop thread cleanup handler.
	(pthread::pop_cleanup_handler): Temporarily allow cleanup function to
	destroy cleanup handler so we can pop in another function than we
	pushed in.
2012-05-23 16:26:34 +00:00
Corinna Vinschen 86b35406f2 * thread.cc (pthread::cancel): Only allow asynchronous cancellation
if the thread is not executing Cygwin or Windows code.  Explain why.
2012-05-23 13:30:26 +00:00