Commit Graph

14092 Commits

Author SHA1 Message Date
Jeff Johnston de6ebe0e8b 2012-02-21 Joern Rennecke <joern.rennecke@embecosm.com>
* COPYING.NEWLIB: Add Adapteva notice.
        * COPYING.LIBGLOSS: Add Adapteva notice.
2012-02-21 22:40:27 +00:00
Jeff Johnston b07cfbff06 2012-02-21 Jeremy Bennett <jeremy.bennett@embecosm.com>
Alan Lehotsky  <apl@alum.mit.edu>
            Joern Rennecke  <joern.rennecke@embecosm.com>

        * configure.in: Add Epiphany support.
        * configure: Regenerate.
        * epiphany: New directory.
        * libgloss/README: Add Epiphany entry.
2012-02-21 22:37:47 +00:00
Jeff Johnston 9edde1d2c4 2012-02-21 Jeremy Bennett <jeremy.bennett@embecosm.com>
Alan Lehotsky  <apl@alum.mit.edu>
            Joern Rennecke  <joern.rennecke@embecosm.com>

        * configure.host: Add Epiphany support.
        * libc/include/machine/ieeefp.h: Likewise.
        * libc/include/machine/setjmp.h: Likewise.
        * libc/machine/configure.in, libc/sys/configure.in: Likewise.
        * libc/machine/configure, libc/sys/configure: Regenerate.
        * libc/machine/epiphany, libc/sys/epiphany: New directories.
        * NEWS: Mention addition of Epiphany.
2012-02-21 22:34:31 +00:00
Corinna Vinschen 801bf9f272 * shared.cc (shared_info::init_obcaseinsensitive): Check actual state
of case sensitivity on post-Windows 2000 systems.
	* wincap.h (wincaps::kernel_is_always_casesensitive): New element.
	* wincap.cc: Implement above element throughout.
2012-02-21 17:03:51 +00:00
Corinna Vinschen db05364aa9 * faq-using.xml (faq.using.bloda): Add AVAST and Citrix Metaframe
Presentation Server.
2012-02-21 16:26:36 +00:00
Corinna Vinschen 3c53eaeb5b * flock.cc (inode_t::del_my_locks): Drop useless counter lc. Close
lock object handle explicitely in case of called during fork.  Add
	comment to explain why.
	* fork.cc (frok::child): Drop declaration of fixup_lockf_after_fork.
2012-02-20 14:08:37 +00:00
Corinna Vinschen 2196614e3d * timer.cc (getitimer): Don't create another local ret variable in
timer_gettime calling branch.  Simplify conditional since timer_gettime
	always returns 0 or -1 anyway.
2012-02-17 17:34:01 +00:00
Corinna Vinschen 1cb1472404 * ntdll.h (struct _PEB): Add EnvironmentUpdateCount member.
* spawn.cc (child_info_spawn::worker): Speed up job recognition.  Expand
	comment to explain every little detail and so we never forget.
	* wincap.h (wincaps::has_program_compatibility_assitant): New element.
	* wincap.cc: Implement above element throughout.
2012-02-17 14:26:18 +00:00
Corinna Vinschen e86c278998 * mount.cc (get_disk_type): Drop unneeded toupper call. Convert case
constants to wide chars.
2012-02-17 14:17:12 +00:00
Corinna Vinschen 732f3bc821 *** empty log message *** 2012-02-16 11:12:00 +00:00
Corinna Vinschen 9de0461985 * autoload.cc (NetUseGetInfo): Define.
* fhandler_disk_file.cc (fhandler_cygdrive::opendir): Rename flptst
	to drive.  Call new get_disk_type function rather than is_floppy and
	check SMB drives with the NetUseGetInfo function.  Explain why.
	* mount.cc (get_disk_type): New function to evaluate disk type from
	native NT device name.
	(is_floppy): Remove.
	* mount.h (enum disk_type): Define.
	(get_disk_type): Declare.
	* path.h (is_floppy): Drop declaration.
2012-02-16 11:02:05 +00:00
Corinna Vinschen fb97e87479 * miscfuncs.cc: Revert change from 2012-02-13 which used the
Windows-provided stack rather than an own stack created in
	CygwinCreateThread.
	(struct thread_wrapper_arg): Rename commitsize to stacklimit.
	(CygwinCreateThread): Rename commitsize to real_stacklimit.
2012-02-15 21:34:06 +00:00
Christopher Faylor 2d192e1ebb * configure.host: Fix typo: xdir_dir -> xdr_dir. 2012-02-15 18:32:05 +00:00
Corinna Vinschen 5e7c84e554 * dtable.cc (dtable::init_std_file_from_handle): Use tmp_pathbuf for
name.
	(handle_to_fn): Ditto for device.  Fix size in QueryDosDeviceW call.
2012-02-15 16:11:36 +00:00
Christopher Faylor a0f4e7d3f1 * smallprint.cc (tmpbuf): Declare new class holding a static buffer, protected
by a lock.
(__small_vsprintf): Use tmpbuf to hold large buffer.
(__small_vswprintf): Ditto.
2012-02-15 15:33:56 +00:00
Corinna Vinschen 5eb802f8ed * flock.cc (lf_setlock): Add timeout variable and set before calling
WFMO.  Drop debug output if process is not available.  Set timeout to
	0 instead.  Document timeout 0 in WFMO comment.
	(lf_getblock): Drop invalid F_POSIX lock type shortcut.  Only return
	overlap if event is not signalled.  Fix comment.
2012-02-15 14:43:07 +00:00
Christopher Faylor 1423a93374 . 2012-02-14 20:04:59 +00:00
Christopher Faylor 4eb5175d90 * pinfo.cc (_pinfo::set_ctty): Revert 2012-02-07 change to skip function if tty
in question == our ctty.
* syscalls.cc (setsid): Avoid two function calls.
* dtable.cc (dtable::dup_worker): Remove debugging.
* init.cc (search_for): Calculate for every new process rather than using
shared value.
(threadfunc_ix): Fill in for ever new process rather than sing shared value.
2012-02-14 19:08:20 +00:00
Corinna Vinschen 5401796acf * fhandler_disk_file.cc (fhandler_cygdrive::fstat): Don't bother to
set st_nlink correctly, just set it to 1 to avoid potential network
	timeouts.
2012-02-14 15:22:13 +00:00
Corinna Vinschen ab9108200f * transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
Always use cygwin_internal to fetch installation key.
2012-02-14 14:12:11 +00:00
Corinna Vinschen a8c8f19a43 * flock.cc (lf_setlock): Don't close waited lock object handle before
we own the node lock.  Fix comment.
2012-02-14 13:55:45 +00:00
Corinna Vinschen 8895d962d5 * cygheap.cc (init_cygheap::init_installation_root): Convert function
init_installation_root into a cygheap method.
	* cygheap.h (struct init_cygheap): Move installation_root,
	installation_key, and installation_key_buf from shared
	.cygwin_dll_common DLL section to cygheap.  Declare new method
	init_installation_root.
	* dtable.cc (handle_to_fn): Accommodate the move of installation strings
	to the cygheap.
	* external.cc (cygwin_internal): Ditto.
	* fhandler_console.cc (fhandler_console::open_shared_console): Ditto.
	* fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Ditto.
	* fhandler_tty.cc: Ditto, throughout.
	* mount.cc (mount_info::init): Ditto.
	* pipe.cc (fhandler_pipe::create): Ditto.
	* shared.cc: Ditto, throughout.
	(installation_root): Remove.
	(installation_key): Move to cygheap.
	(installation_key_buf): Ditto.
	(installation_root_inited): Remove.
	(SPIN_WAIT): Remove.
	(init_installation_root): Move to cygheap.
	(memory_init): Call cygheap->init_installation_root right after
	cygheap->user.init.  Drop call of init_installation_root function.
	* shared_info.h (init_installation_root): Drop declaration.
	(installation_root): Ditto.
	(installation_key): Ditto.
	* uinfo.cc (pwdgrp::load): Accommodate the move of installation strings
	to the cygheap.
2012-02-14 11:27:43 +00:00
Corinna Vinschen 78b5f9545d * thread.cc: Drop including unused headers. 2012-02-14 09:45:21 +00:00
Corinna Vinschen 722c69734d * miscfuncs.cc (struct thread_wrapper_arg): Convert char * to PBYTE.
Change related casts throughout.
	(thread_wrapper): Only do the thread change if the application provided
	the stack.  Otherwise, just use the Windows-provided stack.  Set up
	POSIX guardpage here, if necessary.  Move related comment from
	CygwinCreateThread here.
	(CygwinCreateThread): Never allocate and set up own stack here.  Just
	compute stack size to reserve and use value in CreateThread call if
	stack hasn't been provided by the application.
2012-02-13 15:23:03 +00:00
Corinna Vinschen d7bcd2a16f * Makefile.in (clean): Remove non-existant regexp dir.
* collate.h: New header.
	(__collate_range_cmp): Declare.
	(__collate_load_error): Define.
	* glob.cc: Pull in latest version from FreeBSD.  Simplify and reduce
	Cygwin-specific changes.
	* regex/regcomp.c: Include collate.h on Cygwin as well.
	(__collate_range_cmp): Move from here...
	* nlsfuncs.cc (__collate_range_cmp): ...to here.

	* miscfuncs.cc (thread_wrapper): Fix typo in comment.
	(CygwinCreateThread): Take dead zone of Windows stack into account.
	Change the way how the stack is commited and how to handle guardpages.
	Explain how and why.
	* thread.h (PTHREAD_DEFAULT_STACKSIZE): Change definition.  Explain why.
2012-02-13 13:12:37 +00:00
Yaakov Selkowitz e633eaec08 * include/pthread.h: Include time.h as required by POSIX. 2012-02-13 01:46:46 +00:00
Christopher Faylor e52a43f101 * exception.h (stackdump): Declare.
* exceptions.cc (stackdump): Rework to perform all operations needed for a
stackdump and to avoid recursion.
(exception::handle): Use simplified stackdump interface.
* sigproc.cc (signal::exit): Ditto.  Delete now, uneeded declaration.
2012-02-12 22:43:33 +00:00
Corinna Vinschen ce48510394 * miscfuncs.cc (DEFAULT_STACKSIZE): Remove.
(CygwinCreateThread): Simplify code by assuming that now stack-related
	input values are undefined.  Set stack protection to PAGE_READWRITE,
	as is default on Windows.  Add lengthy comment to explain POSIX
	guardpage.
	* thread.cc (pthread_attr::pthread_attr): Initialize stacksize as
	PTHREAD_DEFAULT_STACKSIZE.  Initialize guardsize as
	PTHREAD_DEFAULT_GUARDSIZE.
	* thread.h (PTHREAD_DEFAULT_STACKSIZE): Define.  Add comment to explain.
	(PTHREAD_DEFAULT_GUARDSIZE): Define.
2012-02-11 17:37:02 +00:00
Corinna Vinschen 793371f584 * miscfuncs.cc (DEFAULT_STACKSIZE): Set to 1 Megs. Drop comment about
RLIMIT_STACK.

	* registry.cc (get_registry_hive_path): Expect the user hive path to
	be never longer than MAX_PATH.  Don't prepend native NT path prefix
	here.  Add comment.
	(load_registry_hive): Prepend native NT path prefix here.  Additionally
	try to load user's classes hive.
	* uinfo.cc (cygheap_user::env_userprofile): Reduce size of
	userprofile_env_buf to MAX_PATH.  Add comment.
2012-02-10 20:56:22 +00:00
Christopher Faylor c38a2d8373 * syscalls.cc (setsid): On second thought, in the spirit of keeping things
kludgy, set ctty to -2 here as a special flag, and...
(open): ...only eschew setting O_NOCTTY when that case is detected.
2012-02-10 16:43:36 +00:00
Christopher Faylor 93b18fd232 * syscalls.cc (open): Semi-revert (?) to allowing open of a tty to become
controlling tty if there is no controlling tty.
2012-02-10 16:33:53 +00:00
Eric Blake 833630b859 * libc/include/_ansi.h (_ELIDABLE_INLINE): Fix C99 mode. 2012-02-09 19:58:33 +00:00
Christopher Faylor 3b20fd9324 * exceptions.cc (setup_handler): Reduce system_printf to sigproc_printf since
it is for a transient situation which will undoubtedly be handled.
2012-02-09 16:05:23 +00:00
Corinna Vinschen cd1a95f55a * fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::write): Set
bytes_to_write to 0 in case it fits into the buffer, otherwise suffer
	early EOF in caller.
2012-02-09 15:23:17 +00:00
Corinna Vinschen 9eba4de269 * dll_init.h (struct dll): Re-add modname.
* dll_init.cc: Throughout, use modname where it was used before.
	(dll_list::operator[]): Use modname.  Move comment from dll_list::alloc
	here and remove hint about GetModuleBaseNameW.
	(dll_list::alloc): Store full path in name, pointer to basename in
	modname.  Search dll using modname.
2012-02-09 14:41:21 +00:00
Corinna Vinschen e59d6a1469 * libc/sys/rtems/sys/utime.h: Include <sys/types.h> to provide a
definition of time_h.
2012-02-09 13:05:15 +00:00
Corinna Vinschen 21e4f66a72 Add missing file from previous checkin 2012-02-09 12:57:34 +00:00
Corinna Vinschen 3543a40d5c * libc/machine/arm/strcmp.S: New File.
* libc/machine/arm/strcmp.c: Deleted.
	* libc/machine/arm/Makefile.am: Replaces strcmp.c with strcmp.S
	* libc/machine/arm/Makefile.in: Regenerated.
	* testsuite/newlib.string/strcmp-1.c: New file.
2012-02-09 10:42:14 +00:00
Corinna Vinschen a442c9cddc * passwd.cc: Add -v option to print version information as well, since
it's used in older csih.
2012-02-09 10:11:26 +00:00
Corinna Vinschen e7420de9a2 *** empty log message *** 2012-02-09 09:04:10 +00:00
Christopher Faylor 06f46dc379 * dtable.cc (dtable::init_std_file_from_handle): Reinstate opening tty handles
with O_RDWR permissions.
2012-02-09 01:20:55 +00:00
Corinna Vinschen 461c56569f * thread.cc (__pthread_cond_wait_init): New static function replacing
__pthread_cond_dowait.  Only check and potentially initialize cond and
	mutex, drop call to (*cond)->wait.
	(pthread_cond_timedwait): Replace call to __pthread_cond_dowait with
	separate calls to __pthread_cond_wait_init and (*cond)->wait to be
	able to initialize cond before accessing its clock_id member.
	(pthread_cond_wait): Ditto (more or less).
2012-02-08 19:58:37 +00:00
Christopher Faylor 30c66cea49 * include/sys/wait.h: Remove C++ inline functions for `union wait'. For C++
use `void *' as __wait_status_ptr_t instead.  This is less type safe but fixes
compile error on `wait(NULL)'.  Remove extra `;'.
2012-02-08 19:51:13 +00:00
Corinna Vinschen bb2b641c13 * sigproc.cc (child_info_fork::abort): Call TerminateProcess rather
than ExitProcess.
2012-02-08 19:43:14 +00:00
H.J. Lu ea96df1d4c Implement Intel Transactional Synchronization Extensions
gas/

2012-02-08  H.J. Lu  <hongjiu.lu@intel.com>

	* config/tc-i386.c (HLE_PREFIX): New.
	(check_hle): Likewise.
	(_i386_insn): Add have_hle.
	(cpu_arch): Add .hle and .rtm.
	(md_assemble): Call check_hle if i.have_hle isn't zero.
	(parse_insn): Set i.have_hle to 1 for HLE prefix.
	(output_jump): Support up to 2 byte opcode.

	* doc/c-i386.texi: Document hle/.hle and rtm/.rtm.

gas/testsuite/

2012-02-08  H.J. Lu  <hongjiu.lu@intel.com>

	* gas/i386/hle-intel.d: New.
	* gas/i386/hle.d: Likewise.
	* gas/i386/hle.s: Likewise.
	* gas/i386/hlebad.l: Likewise.
	* gas/i386/hlebad.s: Likewise.
	* gas/i386/rtm-intel.d: Likewise.
	* gas/i386/rtm.d: Likewise.
	* gas/i386/rtm.s: Likewise.
	* gas/i386/x86-64-hle-intel.d: Likewise.
	* gas/i386/x86-64-hle.d: Likewise.
	* gas/i386/x86-64-hle.s: Likewise.
	* gas/i386/x86-64-hlebad.l: Likewise.
	* gas/i386/x86-64-hlebad.s: Likewise.
	* gas/i386/x86-64-rtm-intel.d: Likewise.
	* gas/i386/x86-64-rtm.d: Likewise.
	* gas/i386/x86-64-rtm.s: Likewise.

	* gas/i386/i386.exp: Run hle, hle-intel, hlebad x86-64-hle, rtm,
	rtm-intel, x86-64-hle-intel, x86-64-hlebad, x86-64-rtm and
	x86-64-rtm-intel.

include/opcode/

2012-02-08  H.J. Lu  <hongjiu.lu@intel.com>

	* i386.h (XACQUIRE_PREFIX_OPCODE): New.
	(XRELEASE_PREFIX_OPCODE): Likewise.

opcodes/

2012-02-08  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-dis.c (HLE_Fixup1): New.
	(HLE_Fixup2): Likewise.
	(HLE_Fixup3): Likewise.
	(Ebh1): Likewise.
	(Evh1): Likewise.
	(Ebh2): Likewise.
	(Evh2): Likewise.
	(Ebh3): Likewise.
	(Evh3): Likewise.
	(MOD_C6_REG_7): Likewise.
	(MOD_C7_REG_7): Likewise.
	(RM_C6_REG_7): Likewise.
	(RM_C7_REG_7): Likewise.
	(XACQUIRE_PREFIX): Likewise.
	(XRELEASE_PREFIX): Likewise.
	(dis386): Use Ebh1/Evh1 on add, adc, and, btc, btr, bts,
	cmpxchg, dec, inc, neg, not, or, sbb, sub, xor and xadd. Use
	Ebh2/Evh2 on xchg.  Use Ebh3/Evh3 on mov.
	(reg_table): Use Ebh1/Evh1 on add, adc, and, dec, inc, neg,
	not, or, sbb, sub and xor.  Use Ebh3/Evh3 on mov.  Use
	MOD_C6_REG_7 and MOD_C7_REG_7.
	(mod_table): Add MOD_C6_REG_7 and MOD_C7_REG_7.
	(rm_table): Add RM_C6_REG_7 and RM_C7_REG_7.  Add xend and
	xtest.
	(prefix_name): Handle XACQUIRE_PREFIX and XRELEASE_PREFIX.
	(CMPXCHG8B_Fixup): Handle HLE prefix on cmpxchg8b.

	* i386-gen.c (cpu_flag_init): Add CPU_HLE_FLAGS and
	CPU_RTM_FLAGS.
	(cpu_flags): Add CpuHLE and CpuRTM.
	(opcode_modifiers): Add HLEPrefixOk.

	* i386-opc.h (CpuHLE): New.
	(CpuRTM): Likewise.
	(HLEPrefixOk): Likewise.
	(i386_cpu_flags): Add cpuhle and cpurtm.
	(i386_opcode_modifier): Add hleprefixok.

	* i386-opc.tbl: Add HLEPrefixOk=3 to mov.  Add HLEPrefixOk to
	add, adc, and, btc, btr, bts, cmpxchg, dec, inc, neg, not, or,
	sbb, sub, xor and xadd.  Add HLEPrefixOk=2 to xchg with memory
	operand.  Add xacquire, xrelease, xabort, xbegin, xend and
	xtest.
	* i386-init.h: Regenerated.
	* i386-tbl.h: Likewise.
2012-02-08 18:20:39 +00:00
Corinna Vinschen 7dc730e8ee * uinfo.cc (cygheap_user::env_userprofile): Simplify since network
drives are not supported here.
2012-02-08 17:51:34 +00:00
Corinna Vinschen a7a03a3920 * uinfo.cc (cygheap_user::env_userprofile): Convert native
userprofile path returned from get_registry_hive_path to Win32 path.
2012-02-08 17:45:43 +00:00
Corinna Vinschen 8f4ea5f005 * dll_init.cc: Throughout, drop usage of modname in favor of name.
(dll_list::find_by_modname): Remove.
	(dll_list::alloc): Only store module basename in name.  Add comment to
	explain why.  Simplify address check.  Fix formatting in comment.
	* dll_init.h (struct dll): Drop modname and find_by_modname.
2012-02-08 17:35:02 +00:00
Corinna Vinschen 25e67cd634 * dll_init.cc (dll_list::alloc): Add DLL name to fabort output. Fix
fabort string in case of bss start.
2012-02-08 14:41:51 +00:00
Corinna Vinschen 9553860f41 * include/sys/sysmacros.h: Include sys/types.h. 2012-02-08 14:08:58 +00:00