Commit graph

383 commits

Author SHA1 Message Date
Corinna Vinschen 2da426bee6 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 24. 2013-08-09 09:12:55 +00:00
Corinna Vinschen 5709fcbfe5 Fix copyright date 2013-07-24 14:21:13 +00:00
Corinna Vinschen 3fdddd7d77 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 23. 2013-07-22 15:08:54 +00:00
Christopher Faylor 521953a83a * common.din: Export GetCommandLine{A,W}.
* kernel32.cc: Add includes needed for GetCommandLine functions.
(ucmd): New function.
(cygwin_GetCommandLineW): Ditto.
(cygwin_GetCommandLineA): Ditto.
* spawn.cc (child_info_spawn::worker): Rename one_line -> cmd.  Use lb_wcs
macro to generate a wide character version of the line buffer.  Remove
duplicate printing of command line.  Don't access members of linebuf directly.
* winf.h: Use pragma once.
(linebuf): Make storage private.
(linebuf::operator size_t): New operator.  Return size of buf.
(linebuf::operator wchar_t): New operator.
(linebuf::wcs): New function.
(lb_wcs): New macro.
* include/cygwin/version.h: Bump API minor number to 268.
* strfuncs.cc: Clarify descriptive file comment.
2013-07-19 17:28:34 +00:00
Corinna Vinschen 7ea982e75a * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 22. 2013-07-15 11:44:04 +00:00
Yaakov Selkowitz ccccd71d58 * common.din (rawmemchr): Export.
* posix.sgml (std-gnu): Add rawmemchr.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2013-06-24 15:12:40 +00:00
Corinna Vinschen 34ec6f665b * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 21. 2013-06-07 09:21:53 +00:00
Corinna Vinschen aa6aee7dd7 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 20. 2013-06-05 09:37:53 +00:00
Corinna Vinschen 291d93b58b * Makefile.in (DLL_OFILES): Add arc4random.o.
* common.din: Export arc4random, arc4random_addrandom, arc4random_buf,
	arc4random_stir and arc4random_uniform.
	* mktemp.cc (arc4random): Remove static replacement function.
	* posix.sgml (std-bsd): Add arc4random functions.
	* include/cygwin/stdlib.h: Declare arc4random functions.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* libc/arc4random.cc: New file implementing arc4random functions taken
	from FreeBSD.
2013-05-21 19:04:49 +00:00
Corinna Vinschen e99674fb55 * libc/base64.c: New file.
* Makefile.in (DLL_OFILES): Add base64.o.
	* common.din: Export __b64_ntop and __b64_pton.
	* posix.sgml (std-bsd): Add __b64_ntop and __b64_pton.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2013-05-21 10:07:55 +00:00
Christopher Faylor 73dfbd86bd * include/cygwin/version.h: Bump api minor number to reflect previous change. 2013-05-13 19:27:34 +00:00
Corinna Vinschen 61522196c7 * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
Corinna Vinschen fc1ff1150c * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 19. 2013-04-22 10:13:30 +00:00
Christopher Faylor bc837d22f3 Throughout, update copyrights to reflect dates which correspond to main-branch
checkins.  Regularize copyright format.
2013-01-21 04:38:31 +00:00
Yaakov Selkowitz beaf1df02c * termios.cc (cfsetspeed): New function.
* cygwin.din (cfsetspeed): Export.
* posix.sgml (std-bsd): Add cfsetspeed.
* include/sys/termios.h (cfsetspeed): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2012-11-21 20:13:07 +00:00
Corinna Vinschen 3f30575344 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 18. 2012-10-21 10:20:53 +00:00
Christopher Faylor b8a84b73d7 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 17. 2012-07-21 17:13:42 +00:00
Corinna Vinschen 010f7350ba * cygwin.din (getmntent_r): Export.
* mount.cc (getmntent_r): New function.
	* posix.sgml (std-gnu): Add getmntent_r.
	* include/mntent.h (getmntent_r): Declare.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2012-07-18 11:17:25 +00:00
Corinna Vinschen 3ebb4f04b5 * cygwin.din (memrchr): Export.
* posix.sgml (std-gnu): Add memrchr.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2012-05-10 08:35:22 +00:00
Corinna Vinschen 3ef81a86fb * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 16. 2012-05-10 06:51:40 +00:00
Corinna Vinschen f1ce77295d * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 15. 2012-04-24 16:05:20 +00:00
Corinna Vinschen d422f9e30f * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 14. 2012-04-05 15:26:27 +00:00
Corinna Vinschen fba41a7c3d * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 13. 2012-04-03 14:54:17 +00:00
Christopher Faylor 704bb69dcb * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 12. 2012-02-25 17:32:38 +00:00
Yaakov Selkowitz e587f14b6f * cygwin.din (scandirat): Export.
* posix.sgml (std-gnu): Add scandirat.
	* syscalls.cc (scandirat): New function.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* include/sys/dirent.h (scandirat): Declare.
2012-02-22 01:58:24 +00:00
Christopher Faylor a72ada654e * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 11. 2012-02-07 16:50:19 +00:00
Christopher Faylor 0e1f0840d2 Update copyright on all files checked in so far this year.
* fhandler.h: Use #pragma once rather than ifdef guards.
(fhandler_console::tc_getpgid): Return our pgid if we have never opened a
console.
* fork.cc: Rearrange includes to accommodate fhandler.h use of pinfo.h.
* sigproc.cc: Ditto.
* spawn.cc: Ditto.
(child_info_spawn::worker): Query myself->pgid rather than calling expensive
function.
* thread.h: Use #pragma once rather than ifdef guards.
* pinfo.h: Use #pragma once rather than ifdef guards.
(pinfo::remember): Don't define if sigproc.h has not been included.
(pinfo::reattach): Ditto.
* sigproc.h: Use #pragma once rather than ifdef guards.  Use different test to
see if pinfo.h has been included.
2012-01-11 19:07:11 +00:00
Yaakov Selkowitz 50350cafb3 * cygwin.din (pthread_sigqueue): Export.
* posix.sgml (std-gnu): Add pthread_sigqueue.
	* thread.cc (pthread_sigqueue): New function.
	* include/thread.h (pthread_sigqueue): New function.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2012-01-06 07:12:18 +00:00
Yaakov Selkowitz 0b5355f17c * cygwin.din (get_current_dir_name): Export.
* path.cc (get_current_dir_name): New function.
	* posix.sgml (std-gnu): Add get_current_dir_name.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2012-01-01 18:54:25 +00:00
Yaakov Selkowitz d5f3e0ba9a * cygwin.din (getpt): Export.
* posix.sgml (std-gnu): Add getpt.
	* tty.cc (getpt): New function.
	* include/cygwin/stdlib.h [!__STRICT_ANSI__] (getpt): Declare.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2011-12-30 20:22:28 +00:00
Corinna Vinschen 3a24189bba * external.cc (cygwin_internal): Implement CW_ALLOC_DRIVE_MAP,
CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP.
	* fhandler_process.cc: Include mount.h.
	(get_volume_path_names_for_volume_name): Move to mount.cc.
	(struct dos_drive_mappings): Ditto.
	* mount.cc (get_volume_path_names_for_volume_name): Move here.
	(dos_drive_mappings::dos_drive_mappings): Ditto.
	(dos_drive_mappings::fixup_if_match): Ditto.
	(dos_drive_mappings::~dos_drive_mappings): Ditto.
	* mount.h (class dos_drive_mappings): Declare her.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_ALLOC_DRIVE_MAP,
	CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP.
	* include/cygwin/version.h: Bump API minor number.
2011-12-22 12:25:10 +00:00
Christopher Faylor 65a6152f18 * cygwin.din (ptsname_r): Export.
* fhandler.cc (fhandler_base::ptsname_r): Define.
* fhandler.h (fhandler_base::ptsname): Delete.
(fhandler_base::ptsname_r): Declare.
(fhandler_pty_master::ptsname_r): Declare.
* fhandler_tty.cc (fhandler_pty_master::ptsname): Delete.
(fhandler_pty_master::ptsname_r): New reentrant function derived from previous
ptsname.
* syscalls.cc (ptsname_r): Implement new function with functionality similar to
Linux.
(ptsname): Use ptsname_r () to fill out buf.
* include/cygwin/stdlib.h (ptsname_r): Declare.
* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 255 to reflect
export of ptsname_r.
* pinfo.cc (pinfo::wait): Return bool rather than int.
* pinfo.h (info::wait): Ditto.
(pinfo::reattach): Define !defined(_SIGPROC_H) case for consistency.
* sigproc.cc (child_info_spawn::reattach_children): Use correct dwProcessId
rather than pid when duplicating handle.
2011-11-07 20:05:49 +00:00
Corinna Vinschen 0c1d8aaaf1 * cygwin.din (getgrouplist): Export.
* grp.cc (get_groups): New static function to run the core functionality
	of initgroups and getgrouplist.
	(initgroups32): Call get_groups and just create supplementary group
	list in cygheap.  Rename name of first argument to "user".  Add an
	assertion to test for a NULL user name.
	(initgroups): Rename name of first argument to "user".
	(getgrouplist): New function.
	* posix.sgml (std-bsd): Add getgrouplist.
	* include/cygwin/grp.h (getgrouplist): Declare.
	* include/cygwin/version.h: Bump API minor number.
2011-10-28 09:26:42 +00:00
Christopher Faylor 4add6f8db1 * cygwin.din: Remove some _tc* exports. Add tcgetsid().
* dtable.cc (fh_alloc): Revert ill-advised setting of major/minor.  Use new
is_dev_tty to remember that this device was opened as /dev/tty.
* fhandler.cc (fhandler_base::fstat): Remove leftover debugging statement.
(fhandler_base::tcgetsid): New function.
* fhandler.h ((fhandler_base::tcgetsid): Declare new function.
(fhandler_base::is_dev_tty): Ditto.
(fhandler_termios::opened_as_dev_tty): Declare new field.
(fhandler_termios::is_dev_tty): Declare new function.
(fhandler_termios::tcgetsid): Ditto.
(fhandler_pty_common::use_archetype): Move here from subclass.
(fhandler_pty_slave::use_archetype): Move up.
(fhandler_pty_master::use_archetype): Ditto.
* fhandler_console.cc (fhandler_console::ioctl): Rename second argument from
`buf' to `arg' for consistency.  Call ioctl_termios for common fhandler_termios
ioctl handling.
* fhandler_tty.cc (fhandler_pty_slave::ioctl): Call ioctl_termios for common
fhandler_termios ioctl handling.
(fhandler_pty_master::ioctl): Ditto.
* fhandler_termios.cc (fhandler_termios::tcgetsid): Implement new function.
(fhandler_termios::ioctl_termios): Ditto.  Implements TIOCSCTTY handling.
* syscalls.cc (stat_worker): Set /dev/tty device info when appropriate.
* termios.cc (tcgetpgrp): Avoid extraneous "isatty" check.
(tcgetsid): Implement new function.
* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 253.
* include/sys/termios.h (TIOCSCTTY): Define.
2011-10-11 23:20:38 +00:00
Corinna Vinschen 8dfce03bfa * external.cc (create_winenv): Rename from sync_winenv. Take
environment pointer as parameter and return pointer to corresponding
	win32 environment block if != NULL.  Otherwise just sync as before.
	(cygwin_internal): Add CW_CVT_ENV_TO_WINENV case.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CVT_ENV_TO_WINENV.
2011-10-05 12:27:37 +00:00
Corinna Vinschen c429beb296 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. 2011-08-16 14:48:38 +00:00
Yaakov Selkowitz bfc071dbce * cygwin.din (clock_nanosleep): Export.
* posix.sgml (std-notimpl): Move clock_nanosleep from here...
(std-susv4): ... to here.
(std-notes): Note limitations of clock_nanosleep.
* signal.cc (clock_nanosleep): Renamed from nanosleep, adding clock_id
and flags arguments and changing return values throughout.
Improve checks for illegal rqtp values.  Add support for
CLOCK_MONOTONIC and TIMER_ABSTIME.
(nanosleep): Rewrite in terms of clock_nanosleep.
(sleep): Ditto.
(usleep): Ditto.
* thread.cc: Mark clock_nanosleep in list of cancellation points.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2011-08-03 19:17:02 +00:00
Yaakov Selkowitz 8a7b0a00df * cygwin.din (pthread_condattr_getclock): Export.
(pthread_condattr_setclock): Export.
* posix.sgml (std-notimpl): Move pthread_condattr_getclock and
pthread_condattr_setclock from here...
(std-susv4): ... to here.
* sysconf.cc (sca): Set _SC_CLOCK_SELECTION to _POSIX_CLOCK_SELECTION.
* thread.cc: (pthread_condattr::pthread_condattr): Initialize clock_id.
(pthread_cond::pthread_cond): Initialize clock_id.
(pthread_cond_timedwait): Use clock_gettime() instead of gettimeofday()
in order to support all allowed clocks.
(pthread_condattr_getclock): New function.
(pthread_condattr_setclock): New function.
* thread.h (class pthread_condattr): Add clock_id member.
(class pthread_cond): Ditto.
* include/pthread.h: Remove obsolete comment.
(pthread_condattr_getclock): Declare.
(pthread_condattr_setclock): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2011-07-21 09:39:22 +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 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 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 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
Yaakov Selkowitz 6758d2a3aa * times.cc (settimeofday): Add EFAULT handler.
Set errno to EINVAL if tv.tv_nsec is invalid, and to EPERM if
SetSystemTime fails.  Return -1 in case of failure, all for
compatibility with BSD and Linux.
(clock_settime): New function.
* cygwin.din (clock_settime): Export.
* posix.sgml (std-susv4): Add clock_settime.
Move clock_setres from here...
(std-deprec): ... to here.
(std-notes): Correct limitation of clock_setres to only CLOCK_REALTIME.
Add limitation of clock_settime to only CLOCK_REALTIME.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2011-05-09 08:57:46 +00:00
Yaakov Selkowitz 2f52cad971 * sysconf.cc (sysinfo): New function.
* cygwin.din (sysinfo): Export.
* posix.sgml (std-gnu): Add sysinfo.
* include/sys/sysinfo.h (struct sysinfo): Define.
(sysinfo): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2011-05-06 18:53:21 +00:00
Yaakov Selkowitz 2f7a5c89cc * cygwin.din (psiginfo): Export.
(psignal): Export.
(sys_siglist): Export.
* posix.sgml (std-notimpl): Move psiginfo and psignal from here...
(std-susv4): ... to here.
(std-deprec): Add sys_siglist.
* strsig.cc (sys_siglist): New array.
(psiginfo): New function.
* include/cygwin/signal.h (sys_siglist): Declare.
(psiginfo): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2011-05-04 22:12:15 +00:00
Yaakov Selkowitz 705a187ee9 * cygwin.din (pthread_attr_getstack): Export.
(pthread_attr_getstackaddr): Export.
(pthread_getattr_np): Export.
* ntdll.h (enum _THREAD_INFORMATION_CLASS): Add ThreadBasicInformation.
(struct _THREAD_BASIC_INFORMATION): Define.
(NtQueryInformationThread): Declare.
* posix.sgml (std-susv4): Add pthread_attr_getstack.
(std-gnu): Add pthread_getattr_np.
(std-deprec): Add pthread_attr_getstackaddr.
(std-notimpl): Remove pthread_attr_[gs]etstackaddr, as they were
removed from SUSv4.
* thread.cc (pthread_attr::pthread_attr): Initialize stackaddr.
(pthread_attr_getstack): New function.
(pthread_attr_getstackaddr): New function.
(pthread_attr_setstacksize): Return EINVAL if passed size less than
PTHREAD_STACK_MIN, as required by POSIX.
(pthread_getattr_np): New function.
* thread.h (class pthread_attr): Add stackaddr member.
* include/pthread.h (pthread_attr_getstack): Declare.
(pthread_attr_getstackaddr): Declare unconditionally.
(pthread_attr_setstack): Declare inside false conditional for reference.
(pthread_getattr_np): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2011-05-03 01:13:37 +00:00
Corinna Vinschen 20a0b8c8e6 * cygwin.din (ppoll): Export.
* poll.cc (ppoll): Implement.
	* posix.sgml (std-gnu): Add ppoll.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/poll.h (ppoll): Declare.
2011-04-18 12:00:05 +00:00
Yaakov Selkowitz 162deed595 * thread.cc (pthread_setschedprio): New function.
* include/pthread.h (pthread_setschedprio): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* cygwin.din (pthread_setschedprio): Export.
* posix.sgml (std-notimpl) Move pthread_setschedprio from here...
(std-susv4) ...to here.
2011-04-15 09:22:14 +00:00
Corinna Vinschen f00fe1b8e7 * cygwin.din (pthread_spin_destroy): Export.
(pthread_spin_init): Export.
	(pthread_spin_lock): Export.
	(pthread_spin_trylock): Export.
	(pthread_spin_unlock): Export.
	* posix.sgml (std-susv4): Add pthread_spin_destroy, pthread_spin_init,
	pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock.
	(std-notimpl): Remove pthread_spin_[...].
	* pthread.cc (pthread_spin_init): New function.
	* thread.cc (pthread_spinlock::is_good_object): New function.
	(pthread_mutex::pthread_mutex): Rearrange initializers to accommodate
	protected data in pthread_mutex.
	(pthread_spinlock::pthread_spinlock): New constructor.
	(pthread_spinlock::lock): New method.
	(pthread_spinlock::unlock): New method.
	(pthread_spinlock::init): New method.
	(pthread_spin_lock): New function.
	(pthread_spin_trylock): New function.
	(pthread_spin_unlock): New function.
	(pthread_spin_destroy): New function.
	* thread.h (PTHREAD_SPINLOCK_MAGIC): Define.
	(class pthread_mutex): Change access level of members shared with
	derived classes to protected.
	(pthread_mutex::set_shared): New protected method.
	(class pthread_spinlock): New class, derived class of pthread_mutex.
	* include/pthread.h (pthread_spin_destroy): Declare.
	(pthread_spin_init): Declare.
	(pthread_spin_lock): Declare.
	(pthread_spin_trylock): Declare.
	(pthread_spin_unlock): Declare.
	* include/cygwin/types.h (pthread_spinlock_t): New typedef.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2011-03-29 10:32:40 +00:00
Corinna Vinschen b8fe0ec799 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 10. 2011-03-29 10:24:19 +00:00