Commit Graph

8782 Commits

Author SHA1 Message Date
Christopher Faylor beaedec545 * fhandler.cc (handler_base_overlapped::wait_overlapped): Rework to attempt to
properly set errno and bytes read for non-blocking case.  Change to just rely
on res to indicate error conditions.
2011-05-28 18:49:13 +00:00
Christopher Faylor d1dded4d67 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Don't set io_pending
unless ReadFile has returned an error.  (this is a partial fix, accidentally
checked in)
2011-05-28 18:22:59 +00:00
Christopher Faylor 44d2fc0a45 * autoload.cc: Call _api_fatal in asm.
* child_info.h: Redefine CURR_CHILD_INFO_MAGIC.
(child_info_fork::abort): Rename from handle_failure.  Change arguments.
* cygtls.h (_local_storage::ttybuf): New field.
* dcrt0.cc (vapi_fatal): Split api_fatal.  Add "in forked process" to message
when appropriate.
(api_fatal): Use vapi_fatal.
* devices.h: Make multiple inclusion safe.
(fh_devices): Add FH_CONS* stuff.  Reorder slightly.
(device): Eliminate anonymous union.  Add more ways to access minor/major.
(device::setunit): Accommodate no-longer-anonymous union.
(device::is_fs): Ditto.
(device::is_fs_special): Ditto.
(device::major): New function.
(device::minor): Ditto.
(device::is_device): New function.
(device::not_device): Ditto.
(device::operator int): New operator.
(device::operator fh_devices): Ditto.
(device::operator bool): Ditto.
(device::operator DWORD): Ditto.
(device::operator =): Ditto.
(isproc_dev): New function.
(isprocsys_dev): Ditto.
(iscons_dev): Ditto.
(istty_slave_dev): Ditto.
* devices.in: Add new "/dev/cons*" strings.  Accommodate no-longer-anonymous
union throughout.
(BRACK): Use more precise method for initialization.
* devices.cc: Regenerate.
* dtable.cc (dtable::stdio_init): Use get_cttyp instead of get_tty.
(dtable::find_archetype): Use new DWORD operator in device to test archetypes.
(dtable::init_std_file_from_handle): Use different method to initialize 'dev'.
Adapt to different ctty handling and accommodate /dev/cons*.
(fh_alloc): Accommodate no-longer-anonymous union.  Adapt to new /dev/cons*.
(build_fh_pc): Make debugging output more useful.
* exceptions.cc (ctrl_c_handler): Use get_cttyp instead of get_tty.
* external.cc (fillout_pinfo): Accommodate new cons* stuff.
* fhandler.cc (fhandler_base::read): Eliminate is_slow() test.
* fhandler.h (fhandler_base::*): Adapt to changes in device.h.
(fhandler_*::is_slow): Delete.
( fhandler_proc::get_proc_fhandler): Return fh_devices type.
* fhandler_console.cc (open_shared_console): New function.
(console_unit): New class.
(console_unit::console_unit): New constructor.
(enum_windows): New function.  Declare as friend to console_unit.
(fhandler_console::set_unit): New function.
(fhandler_console::get_tty_stuff): Call set_unit to set the unit number and
determine if initialization is needed.  Eliminate flags parameter.
(tty_list::get_cttyp): Rename (sorta) from get_tty.  Return pointer to correct
tty_min.
(fhandler_console::open): Adapt to elimination of argument to get_tty_stuff.
(fhandler_console::output_tcsetattr): Properly detect error condition.
(fhandler_console::fixup_after_fork_exec): Adapt to get_tty_stuff() setting tc
automatically.
* fhandler_proc.cc: Use FH_BAD rather than 0 throughout where using fh_devices
enum.
(fhandler_proc::get_proc_fhandler): Return fh_devices.  Adapt to devices.h
changes.
* fhandler_process.cc: Adapt to devices.h changes.  Use FH_BAD rather than 0
throughout where using fh_devices enum.
* fhandler_procnet.cc: Ditto.
* fhandler_procsys.cc: Ditto.
* fhandler_procsysvipc.cc: Ditto.
* fhandler_tape.cc (fhandler_dev_tape::fhandler_dev_tape): Ditto.
* fhandler_termios.cc (handler_termios::bg_check): Use tc->ttyname() rather
than assuming that we can construct a tty.
* fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Just return
get_minor() of dev.
(fhandler_pty_master::process_slave_output): Add slightly more debugging info.
(fhandler_tty_slave::fhandler_tty_slave): Change name from ntty to unit.
(fhandler_pty_master::open): Ditto.
(fhandler_tty_slave::ioctl): Adapt to change which causes ctty to represent a
complete device.
(fhandler_tty_master::init_console): Add debugging for failure path.
(fhandler_pty_master::setup): Use get_unit() to retrieve unit number rather
than relying on raw ntty.
(fhandler_pty_master::setup): Ditto.
* fhandler_virtual.h (virt_tab_t): Redefine fhandler as fh_devices.
* fork.cc: Remove obsolete vfork stuff.
(frok::child): Don't assume that a ctty == 0 is valid.
* mount.cc (mount_info::conv_to_win32_path): Adapt to device struct changes.
(mount_info::conv_to_win32_path): Ditto.
* path.cc (path_conv::check): Retrive major/minor numbers via a method rather
than accessing them directly from device.  Rely on dev operators to
set/retrieve device information as required by device struct change.
* path.h (isproc_dev): Move to devices.h.
(isprocsys_dev): Ditto.
(isvirtual_dev): Ditto.
(path_conv:{isdevice,isfifo,isspecial,iscygdrive,issocket,get_devn,get_unitn}):
Use device methods to access/manipulate devices.
* pinfo.cc (pinfo::exit): Don't assume that ctty == 0 is valid.  Use iscons_dev
to determine if a device is a console.
(_pinfo::_ctty): Use device::parse to generate tty/cons name.
(_pinfo::set_ctty): Don't assume that ctty == 0 is valid.  Remove redundant
info from debugging.
* shared.cc (offsets): Remove console offset.
* shared_info.h (shared_locations): Ditto.
* syscalls.cc (umask): Use device methods to manipulate device information.
(ctermid): Use device::parse to generate term device name.
* tlsoffsets.h: Regenerate.
* tty.cc (ttyslot): Return minor number of ctty since ctty now represents a
full device.
(tty::create_master): Set ctty to a complete device.
(tty_list::attach): Rework to detect new /dev/cons* stuff.
(tty_list::terminate): Adapt to changes to ctty.
(tty_list::init): Adapt to change to setntty - pass in device major number.
(tty::exists): Use get_unit() to retrive tty unit number.
(tty::open_mutex): Ditto.
(tty::open_inuse): Ditto.
(tty::create_inuse): Ditto.
(tty::get_event): Ditto.
(tty_min::ttyname): Define new function.
* tty.h (tty_min::ntty): Redefine as fh_devices.
(tty::exists): Use get_unit() to retrive tty unit number.
(tty::open_mutex): Ditto.
(tty::open_inuse): Ditto.
(tty::create_inuse): Ditto.
(tty::get_event): Ditto.
(tty_min::ttyname): Declare new function.
(tty::getntty): Declare as const.
(tty_list::operator []): Assure that only minor part of argument is used.
* dll_init.cc (dll_list::alloc): Detect mismatch of data segments early issuing
an explicit error message if necessary.
* heap.cc (heap_init): Adapt to changes from fork->handle_failure to
fork->abort.
* pinfo.h (EXITCODE_FORK_FAILED): New enum.  (from Ryan Johnson)
* sigproc.cc (child_info_fork::abort): Rename from handle_failure.  Change
arguments to allow passing in a printf-like message.
* winsup.h (api_fatal): Delete macro definition.
(api_fatal): Redefine from __api_fatal.
(vapi_fatal): Declare new function.
* include/sys/strace.h (strace_vprintf): Define new macro.
* ntdll.h (_SYSTEM_INFORMATION_CLASS): Add SystemHandleInformation.
2011-05-28 18:17:09 +00:00
Corinna Vinschen bfce73c261 * shared.cc (offsets): Reorder so that console_state is lowest in
memory.  Explain why.
	(open_shared): Accommodate reordering of offsets array.
	* shared_info.h (shared_locations): Reorder SH_SHARED_CONSOLE after
	SH_MYSELF.
2011-05-27 06:11:05 +00:00
Corinna Vinschen 28667da372 * mount.h (MAX_MOUNTS): Raise to 64. 2011-05-26 19:30:00 +00:00
Eric Blake 4e989b35d1 * new-features.sgml (ov-new1.7.10): Document strerror changes. 2011-05-25 19:08:46 +00:00
Eric Blake 154fa4d7ef perror: fix POSIX compliance and work with recent newlib change
* cygtls.h (strerror_r_buf): New buffer.
* errno.cc (strerror): Move guts...
(_strerror_r): ...to new function demanded by newlib.
(strerror_r): Don't clobber strerror buffer.
(_user_strerror): Drop unused declaration.
* tlsoffsets.h: Regenerate.
2011-05-25 18:47:32 +00:00
Corinna Vinschen 6215837523 * init.cc (dll_entry): Reinstantiate wow64_test_stack_marker and
previous stack tests.
2011-05-25 11:33:29 +00:00
Corinna Vinschen 06f85bf553 * legal.sgml: Drop an old paragraph. Reactivate copyright note for
documentation.
2011-05-25 06:29:22 +00:00
Corinna Vinschen c57b66f6c3 * posix.sgml (std-notes): Add missing <para>. 2011-05-25 06:10:24 +00:00
Chris Sutcliffe 7750cea91f 2011-05-24 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/stdlib.h (strtod): Declare as extern to resolve compilation issues.

        Thanks to cgf for the report.
2011-05-24 22:43:29 +00:00
Corinna Vinschen d92e95d62c * mount.cc (mount_info::conv_to_win32_path): Remove unused code.
* mount.h (class mount_info): Remove sys_mount_table_counter member.
	* shared_info.h (class shared_info): Ditto.
	(CURR_SHARED_MAGIC): Update.
2011-05-24 15:09:08 +00:00
Corinna Vinschen 0864dd31db * pinfo.h (struct _pinfo): Reduce size of progname array slightly.
Explain why.
2011-05-24 10:03:34 +00:00
Eric Blake 66b729b284 * cygtls.h (strerror_buf): Resize to allow '-'. 2011-05-23 21:03:06 +00:00
Eric Blake 4d95630803 strerror: match recent glibc changes
* errno.cc (strerror): Print unknown errno as int.
(__xpg_strerror_r): Likewise, and don't clobber strerror buffer.
2011-05-23 20:43:06 +00:00
Chris Sutcliffe 38aa65b899 Fix typo in ChangeLog of previous commit 2011-05-23 20:10:41 +00:00
Chris Sutcliffe 3d1b423011 2011-05-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/time.h (daytime, timezone, tzname): Rework guards to expose when
        compiles with __STRICT_ANSI__.

        Thanks to Felipe Contreras for the report.
2011-05-23 20:04:12 +00:00
Corinna Vinschen 7d375b5a65 * fhandler_process.cc (thread_info::fill_if_match): Reformat.
(format_process_maps): Ditto.  Fetch pointer to procinfo structure
	from mapped process.  Print info about global shared Cygwin regions.
2011-05-23 08:53:25 +00:00
Chris Sutcliffe 6b58abe537 2011-05-22 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/stdlib.h (strtod): Remove possible static declaration to resolve
        issue with gcc.

        Thanks to Tobias Burnus for the report.
2011-05-23 03:43:30 +00:00
Chris Sutcliffe ec05c53dde 2011-05-22 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/stdlib.h (_rotl, _lrotl, _rotr, _lrotr): Resolve conflict with gcc
        by wrapping the functions in brackets.

        Thanks to Kai Tietz for the report.
2011-05-23 03:30:01 +00:00
Chris Sutcliffe 7944431097 2011-05-22 A.B., Khalid <abkhd@users.sourceforge.net>
* Makefile.in: Add support for msvcr100.dll.
        * msvcrt.def.in: Ditto.
2011-05-23 03:02:16 +00:00
Chris Sutcliffe 1e9f105575 2011-05-22 Antoine LECA <antoinel@users.sourceforge.net>
* mingwex/mingw-fseek.c: The anonymous union feature for LARGE_INTEGER is
        not always available, go the long way and use the explicit named union
        members, which are also declared in winnt.h.
2011-05-23 02:54:21 +00:00
Chris Sutcliffe 69080f58f0 2011-05-22 Antoine LECA <antoinel@users.sourceforge.net>
* mingwex/isblank.c:  Fix typo in declaration.
2011-05-23 02:38:49 +00:00
Chris Sutcliffe ecf22d8044 2011-05-22 Antoine LECA <antoinel@users.sourceforge.net>
* include/_mingw.h:  Define GCC system_header only if PCC is not defined.
        * include/stdlib.h:  Fix a long-standing typo which prevented correct use of
        the MB_CUR_MAX macro/variable when DECLSPEC is not supported and <stdlib.h>
        is included before <ctype.h>.
2011-05-23 01:01:18 +00:00
Chris Sutcliffe ec2b3046a1 2011-05-22 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/wingdi.h (GCP_RESULTSW):  Correct defintion.

        Thanks to Albrecht Schlosser for the report and the fix.
2011-05-23 00:13:45 +00:00
Chris Sutcliffe 07c9734518 2011-05-22 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/wchar.h: Include stdio.h to grab definition of FILENAME_MAX.

        Thanks to Jim Bell for the report and Greg Chicares for the fix.
2011-05-23 00:03:22 +00:00
Corinna Vinschen 15ef1f6caf * fhandler_process.cc (struct dos_drive_mappings): Use malloc/free
rather than cmalloc/cfree.  Check return value from malloc before
	using it.
	(struct heap_info): Ditto.
	(struct thread_info): Ditto.  Rename from stack_info.  Rename members
	and local variables accordingly.
	(thread_info::thread_info): Store stack and TEB addresses.
	(thread_info::fill_if_match): Print "teb" if a TEB address has been
	found.  Special case for WOW64, explain why.
	(format_process_maps): Fetch PEB address.  Print MEM_RESERVE regions
	with equal signs to distinguish them from PAGE_NOACCESS regions.  Fix
	printing of 'p' and 's' to differ between MEM_PRIVATE and MEM_MAPPED
	pages, as on Linux.  Print 'g' instead of 'p for PAGE_GUARD pages.
	Print PEB and SharedUserData area if recognized.
2011-05-21 15:57:16 +00:00
Corinna Vinschen 01b49f835d * miscfuncs.cc (CygwinCreateThread): Fix condition for adding the
guardsize to the stacksize.  Fix accompanying comment.
2011-05-20 19:00:51 +00:00
Corinna Vinschen abb205a9fa * miscfuncs.cc (CygwinCreateThread): Add accidentally missing comment. 2011-05-20 18:15:12 +00:00
Corinna Vinschen 5a755a9471 * fhandler_process.cc (struct heap_info): Change type of base and end
members to char *.  Print "shared" rather than "share".
	(struct stack_info): New class to fetch process stack information.
	(format_process_maps): Initialize and check for stack information.
2011-05-20 18:07:52 +00:00
Corinna Vinschen 6bdbccf7bf * miscfuncs.cc (thread_wrapper): Remove statements added for debugging
purposes.
2011-05-20 07:39:20 +00:00
Corinna Vinschen 89d3c72d51 * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
(class child_info_fork): Remove stacksize, add stackaddr and guardsize
	members.
	* dcrt0.cc (child_info_fork::alloc_stack_hard_way): Partial rewrite
	to regenerate the stack exactly as in the parent.
	(child_info_fork::alloc_stack): Set stackaddr to 0, rather than
	stacksize.
	(dll_crt0_1): Check for stackaddr before changing the stack addresses
	in the TEB.
	* fork.cc (frok::child): Check for stackaddr here.
	(frok::parent): Set ch.stackaddr and ch.guardsize if not called from
	the main thread.
	* init.cc (dll_entry): Replace pointer to NT_TIB with pointer to TEB.
	Fix incorrectly changed address test before removing _my_tls.
	Set StackLimit to NULL on Windows 2000.  Explain why.
	* miscfuncs.cc (struct thread_wrapper_arg): Store stackbase rather
	than stacksize, store commitaddr, remove guardsize.  Store all pointers
	as char * for easier address arithmetic.
	(thread_wrapper): Rewrite to remove OS stack before calling thread
	function.  Add lots of comments to explain what we do.
	(CygwinCreateThread): Reserve our own stack in case we got no
	application stack.  Add comments.
	* ntdll.h (struct _TEB): Extend defintion up to DeallocationStack
	member.
	* thread.cc (pthread_attr::pthread_attr): Use "(size_t) -1"
	rather then 0xffffffff.
	* wincap.h (wincaps::has_stack_size_param_is_a_reservation): New
	element.
	* wincap.cc: Implement above element throughout.
2011-05-20 07:23:11 +00:00
Yaakov Selkowitz 660302eb67 * thread.cc: Mark psiginfo and psignal as available in list of
optional cancellation points.
2011-05-19 23:44:55 +00:00
Yaakov Selkowitz d39f0ba981 * new-features.sgml (ov-new1.7.10): Document __fpurge. 2011-05-19 07:24:23 +00:00
Yaakov Selkowitz ed516f97a6 * cygwin.din (__fpurge): Export.
* posix.sgml (std-solaris): Add __fpurge.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2011-05-19 07:23:29 +00:00
Yaakov Selkowitz a5ffa9b80e * posix.sgml (std-susv4): Remove chroot, futimes, hstrerror.
(std-deprec): Add chroot.
(std-bsd): Add futimes, hstrerror.
(std-notimpl): Add clock_nanosleep, nexttoward, nexttowardf.
Remove initstate, which is implemented and listed in std-susv4.
2011-05-18 21:46:54 +00:00
Yaakov Selkowitz d6b764cc83 * new-features.sgml (ov-new1.7.10): Document error.h functions. 2011-05-18 01:26:56 +00:00
Yaakov Selkowitz d470b53c98 * cygwin.din (error): Export.
(error_at_line): Export.
(error_message_count): Export.
(error_one_per_line): Export.
(error_print_progname): Export.
* errno.cc (error_message_count): Define.
(error_one_per_line): Define.
(error_print_progname): Define.
(_verror): New static function.
(error): New function.
(error_at_line): New function.
* posix.sgml (std-gnu): Add error, error_at_line.
* include/error.h: New header.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2011-05-18 01:25:41 +00:00
Yaakov Selkowitz 7dd9fa7ffb * new-features.sgml (ov-new1.7.10): Document CPU-time clock support.
Move pthread stack management APIs to separate listitem.
2011-05-17 17:09:32 +00:00
Yaakov Selkowitz c8ce54290d * cygwin.din (clock_getcpuclockid): Export.
(pthread_getcpuclockid): Export.
* hires.h (PID_TO_CLOCKID): New macro.
(CLOCKID_TO_PID): New macro.
(CLOCKID_IS_PROCESS): New macro.
(THREADID_TO_CLOCKID): New macro.
(CLOCKID_TO_THREADID): New macro.
(CLOCKID_IS_THREAD): New macro.
* ntdll.h (enum _THREAD_INFORMATION_CLASS): Add ThreadTimes.
* posix.sgml (std-notimpl): Add clock_getcpuclockid and
pthread_getcpuclockid from here...
(std-susv4): ... to here.
(std-notes): Remove limitations of clock_getres and clock_gettime.
Note limitation of timer_create to CLOCK_REALTIME.
* sysconf.cc (sca): Set _SC_CPUTIME to _POSIX_CPUTIME, and
_SC_THREAD_CPUTIME to _POSIX_THREAD_CPUTIME.
* thread.cc (pthread_getcpuclockid): New function.
* timer.cc (timer_create): Set errno to ENOTSUP for CPU-time clocks.
* times.cc (clock_gettime): Handle CLOCK_PROCESS_CPUTIME_ID and
CLOCK_THREAD_CPUTIME_ID.
(clock_getres): Ditto.
(clock_settime): Set errno to EPERM for CPU-time clocks.
(clock_getcpuclockid): New function.
* include/pthread.h (pthread_getcpuclockid): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2011-05-17 17:08:10 +00:00
Corinna Vinschen 5e3af166d7 * miscfuncs.cc (thread_wrapper): Remove unused _cygtls record.
* mmap.cc (is_mmapped_region): Avoid crash if no mmaps exist.
2011-05-17 15:37:01 +00:00
Corinna Vinschen 553f08059b * globals.cc (__getlogin_username): Remove.
* uinfo.cc (getlogin_r): Fetch username from cygheap.
	(getlogin): Add static buffer username and fetch username from
	getlogin_r.
2011-05-16 17:58:21 +00:00
Corinna Vinschen bdc00a0d85 * cygtls.h (struct _local_storage): Remove unused members rarg and
_localtime_buf.  Remove username in favor of a global buffer.  Reorder
	slightly to keep the net.cc stuff together.
	* globals.cc (__getlogin_username): New global char buffer.
	* tlsoffsets.h: Regenerate.
	* uinfo.cc (getlogin): Copy username into __getlogin_username.
2011-05-16 15:12:35 +00:00
Corinna Vinschen 883ea27df0 * heap.cc (heap_init): Rewrite initial heap allocation to use addresses
beyond 0x20000000.  Explain why and how.
	* shared.cc (shared_info::heap_slop_size): Remove.
	* shared_info.h (class shared_info): Remove heap_slop_inited and
	heap_slop members.  Remove heap_slop_size declaration.
	(CURR_SHARED_MAGIC): Update.
	* wincap.cc: Throughout, drop heapslop.
	* wincap.h (struct wincaps): Drop heapslop.
2011-05-16 10:27:14 +00:00
Corinna Vinschen 6d6cfa4840 * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Check if the
requested stack is application-provided within the user heap or an
	mmapped region.  If so, just use it.  Add comment to explain why.
	* miscfuncs.cc (thread_wrapper): If an application-provided stack
	has been given, implement cygtls area at the stackbase.  Fix comment.
	* mmap.cc (is_mmapped_region): New function.
	* winsup.h (is_mmapped_region): Declare.
2011-05-16 09:55:18 +00:00
Corinna Vinschen daa69fff5b * miscfuncs.cc (thread_wrapper): Add comments to assembler code. 2011-05-15 19:04:41 +00:00
Corinna Vinschen 7afc14c003 * new-features.sgml (ov-new1.7.10): Document pthread_attr_getguardsize,
pthread_attr_setstack, pthread_attr_setstackaddr and
	pthread_attr_setguardsize.
2011-05-15 18:51:49 +00:00
Corinna Vinschen cdb4231369 * cygwin.din (pthread_attr_getguardsize): Export.
(pthread_attr_setguardsize): Export.
	(pthread_attr_setstack): Export.
	(pthread_attr_setstackaddr): Export.
	* init.cc (dll_entry): Remove wow64_test_stack_marker.  Check for
	unusual stack address by testing stack addresses from current TEB.
	Check validity of _my_tls by testing if it's within the stack as
	given in current TEB.
	* miscfuncs.cc (struct thread_wrapper_arg): New structure used to
	push all required information to thread_wrapper function.
	(thread_wrapper): Wrapper function for actual thread function.
	If an application stack has been given, change %ebp and %esp so that
	the thread function runs on that stack.  If the thread has been created
	by CygwinCreateThread, set up the POSIX guard pages if necessary.
	(CygwinCreateThread): New function.
	* miscfuncs.h (CygwinCreateThread): Declare.
	* ntdll.h (struct _TEB): Define all members up to Peb.
	* posix.sgml (std-susv4): Move pthread_attr_getguardsize,
	pthread_attr_setguardsize and pthread_attr_setstack here.
	(std-deprec): Add pthread_attr_setstackaddr.
	* sysconf.cc (sca): Set _SC_THREAD_ATTR_STACKADDR to
	_POSIX_THREAD_ATTR_STACKADDR.
	* thread.cc (pthread::precreate): Copy pthread_attr stackaddr and
	guardsize members.
	(pthread::create): Call CygwinCreateThread.
	(pthread_attr::pthread_attr): Initialize guardsize.
	(pthread_attr_setstack): New function.
	(pthread_attr_setstackaddr): New function.
	(pthread_attr_setguardsize): New function.
	(pthread_attr_getguardsize): New function.
	(pthread_getattr_np): Copy attr.guardsize.
	* thread.h (pthread_attr): Add member guardsize.
	* include/pthread.h (pthread_attr_getguardsize): Declare.
	(pthread_attr_setguardsize): Declare.
	* include/cygwin/version.h: Bump API minor number.
2011-05-15 18:49:40 +00:00
Corinna Vinschen 2922c6c4aa * include/winbase.h (STACK_SIZE_PARAM_IS_A_RESERVATION): Define. 2011-05-15 16:40:48 +00:00
Corinna Vinschen b4966f9139 * fhandler_process.cc (struct heap_info::heap): Convert base to
uintptr_t.  Add heap_id, end, flags members.
	(heap_info::heap_vm_chunks): Rename from heaps.
	(heap_info::heap_info): Rearrange using RtlQueryProcessDebugInformation
	to get information of heap virtual memory blocks.  Store heap id and
	flags, as well as end address of each block.
	(heap_info::fill_if_match): Check incoming base address against full
	address range of heap chunks.  Convert flag values in extra heap
	information.
	(format_process_maps): Change order so that heap check is done before
	MEM_MAPPED check since there are shareable heaps.
	* ntdll.h (PDI_HEAP_BLOCKS): Define.
	(HEAP_FLAG_NOSERIALIZE): Define.
	(HEAP_FLAG_GROWABLE): Define.
	(HEAP_FLAG_EXCEPTIONS): Define.
	(HEAP_FLAG_NONDEFAULT): Define.
	(HEAP_FLAG_SHAREABLE): Define.
	(HEAP_FLAG_EXECUTABLE): Define.
	(HEAP_FLAG_DEBUGGED): Define.
	(struct _DEBUG_HEAP_ARRAY): Define.
	(struct _DEBUG_HEAP_BLOCK): Define.
2011-05-13 06:50:20 +00:00