Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-03-26 * hires.h (hires_ms::dmsecs): Drop unused method.Corinna Vinschen
* times.cc (JITTER): Remove. (gtod): Revert to process-local variable. (hires_ms::nsecs): Just return system time to disallow discrepancy with the OS. (hires_ms::resolution): Return coarsest timer value from OS. Add comment to explain why. (clock_setres): Ditto.
2011-08-03* cygtls.h (struct _local_storage): Add cw_timer member.Yaakov Selkowitz
* cygtls.cc (_cygtls::init_thread): Initialize locals.cw_timer. (_cygtls::fixup_after_fork): Ditto. * tlsoffsets.h: Regenerate. * ntdll.h (enum _TIMER_INFORMATION_CLASS): Define. (struct _TIMER_BASIC_INFORMATION): Define. (NtQueryTimer): Declare function. * thread.h (cancelable_wait): Change timeout argument to PLARGE_INTEGER and provide NULL default. (fast_mutex::lock): Adjust accordingly. (pthread_cond::wait): Change timeout argument to PLARGE_INTEGER and default to NULL. * thread.cc (cancelable_wait): Change timeout argument to PLARGE_INTEGER. Initialize _cygtls.locals.cw_timer if needed. Use NT waitable timers for handling timeout. Return remaining time to timeout argument if timeout was relative. (pthread_cond::wait): Change timeout argument to PLARGE_INTEGER. Adjust to change in cancelable_wait. (pthread_mutex::lock): Adjust to change in cancelable_wait. (pthread_spinlock::lock): Ditto. (pthread::join): Ditto. (__pthread_cond_dowait): Change waitlength argument to PLARGE_INTEGER. Adjust to changes in cancelable_wait and pthread_cond::wait. (pthread_cond_timedwait): Adjust to change in __pthread_cond_dowait. (pthread_cond_wait): Ditto. (semaphore::_timedwait): Adjust to change in cancelable_wait. (semaphore::_wait): Ditto. * exceptions.cc (handle_sigsuspend): Ditto. * signal.cc (nanosleep): Ditto. * wait.cc (wait4): Ditto. Fix copyright dates. * times.cc (FACTOR, NSPERSEC): Move from here... * hires.h (FACTOR, NSPERSEC): ...to here.
2011-05-17* cygwin.din (clock_getcpuclockid): Export.Yaakov Selkowitz
(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-03-31 * hires.h: Fix copyright.Corinna Vinschen
* times.cc: Ditto. localtime, gmtime). (FACTOR): Add comment. (NSPERSEC): Ditto. (JITTER): New definition. Comment. (systime_ns): Avoid gratuitous copying of the value returned by GetSystemTimeAsFileTime. (corelocaltime, localtime, gmtime): Remove very old, unused code block. (cygwin_tzset): Remove. (hires_ms::timeGetTime_ns): Add missing semicolon in comment. (hires_ms::nsecs): Redefine check for difference between internal timer value and system time.
2011-03-29 * autoload.cc (winmm): Remove time functions. Don't treatCorinna Vinschen
unloadable wave functions as fatal. * hires.h (hires_ms::timeGetTime_ns): New private method. (hires_ms::dmsecs): Call timeGetTime_ns here. * ntdll.h (struct _KSYSTEM_TIME): Define. (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime. (SharedUserData): Define here. (NtQueryTimerResolution): Declare. (NtSetTimerResolution): Declare. * path.cc (SharedUserData): Move to ntdll.h. * times.cc (hires_ms::timeGetTime_ns): New private method. Use throughout instead of timeGetTime. Document entire functionality of timeGetTime in case we need it. (hires_ms::resolution): Try a call to NtQueryTimerResolution to fetch current period. Fall back to heuristic if that fails. Cast to DWORD in assignments to minperiod. (clock_setres): Align period to possible values per a call to NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod and timeEndPeriod with underlying call to NtSetTimerResolution. Use status code from NtSetTimerResolution to compute errno. Convert period to ULONGLONG and store 100ns value to simplify code.
2010-08-09Implement POSIX.1-2004 Monotonic Clock.Yaakov Selkowitz
* hires.h: Change hires_us to hires_ns, with nanosecond resolution. (hires_ns::primed_ft): Remove. (hires_ns::nsecs): New prototype. (hires_ns::usecs): Rewrite in terms of nsecs. (hires_ns::resolution): New prototype. * times.cc: Change hires_us to hires_ns. (ntod): Declare. (systime): Remove. (hires_ns::prime): Increase resolution to nanoseconds. (hires_ns::nsecs): Rename usecs to nsecs to reflect increased resolution. Remove justdelta argument. (hires_ns::resolution): New function. (clock_gettime): Accept CLOCK_MONOTONIC. Use EINVAL instead of ENOSYS per POSIX.1-2004. (clock_getres): Ditto. (clock_setres): Use EINVAL instead of ENOSYS to conform with other implementations. * strace.cc (strace::microseconds): Adjust for hires_ns. * sysconf.cc (sca): Set _SC_MONOTONIC_CLOCK to _POSIX_MONOTONIC_CLOCK. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2010-05-26* hires.h (hires_base::reset): New function.Christopher Faylor
(hires_us): Specify that hires_base is a public import. (hires_ms): Ditto. * times.cc (gtod): Move earlier in file. (settimeofday): Reset gtod so that base will be subsequently recalculated.
2009-10-13Improve clock_gettime and utimensat resolution.Eric Blake
* hires.h (hires_ms): Change initime_us to initime_ns, with 10x more resolution. (hires_ms::nsecs): New prototype. (hires_ms::usecs, hires_ms::msecs, hires_ms::uptime): Adjust. * times.cc (systime_ns): New helper function. (hires_ms::prime): Use it for more resolution. (hires_ms::usecs): Change to... (hires_ms::nsecs): ...with more resolution. (clock_gettime): Use more resolution. (systime): Rewrite in terms of systime_ns. (timespec_to_filetime): Rewrite math to reflect true operation. * fhandler_disk_file.cc (utimens_fs): Use higher resolution.
2005-12-08* hires.h (hires_ms::initime_ms): Delete.Christopher Faylor
(hires_ms::initime_us): Just define as LONGLONG. (hires_ms::uptime): New function. * select.cc (select_stuff::wait): Use gtod for timing to attempt to avoid windows 32 bit wraparound. * times.cc (systime): New function. (times): Replace GetTickCount with gtod.uptime. (hires_us::prime): Use systime() to calculate system time rather than calling GetSystemTimeAsFileTime directly. (hires_ms::prime): Ditto. Eliminate initime_ms. (hires_ms::usecs): Try harder to detect wraparound. * fhandler_proc.cc (format_proc_partitions): Set drive_size to zero to avoid a compiler warning.
2005-11-11* cygheap.h (init_cygheap::_gtod): Remove.Christopher Faylor
* cygwin.din: Export clock_getres and clock_setres. * hires.h (hires_ms::minperiod): Delete declaration. (hires_ms::began_period): Ditto. (hires_ms::prime): Make void. (hires_ms::resolution): Just define here. (hires_ms::usecs): Remove unneeded argument. (gtod): Redeclare as a variable. * timer.cc (timer_thread): Eliminate argument to gtod.usecs(). (timer_tracker::gettime): Ditto. (timer_tracker::settime): Ditto. * times.cc (gettimeofday): Ditto. (hires_ms::began_period): Delete declaration. (hires_us::prime): Remove debugging. (hires_ms::prime): Make void. Eliminate period stuff. (hires_ms::usecs): Eliminate argument to gtod.usecs(). (hires_ms::resolution): New function. (clock_getres): Ditto. (clock_setres): Ditto. * version.h: Bump API version to 143. * include/cygwin/time.h: New file.
2005-11-04* cygheap.h (init_cygheap::_gtod): New hires_ms element.Christopher Faylor
* hires.h (hires_ms::minperiod): Remove static designation. (hires::began_period): New field. * signal.cc: Include headers required for cygheap.h now that gtod lives in the cygheap. * timer.c: Ditto. * times.cc (gtod): Delete variable. (gtod::minperiod): Ditto. (gtod::began_period): Define. (hires_ms::prime): Add more debugging output. Call timeBeginPeriod only when !began_period.
2005-05-18 * mmap.cc (mmap64): Avoid compiler warning.Corinna Vinschen
* ntea.cc (NTReadEA): Ditto. * hires.h (hires_base): Remove useless usecs function.
2005-03-28update copyrightChristopher Faylor
2005-03-28* times.cc (hires_ms::usecs): Compare the difference.Christopher Faylor
* hires.h: Add parentheses to HIRES_DELAY_MAX.
2003-12-23* exceptions.cc (set_signal_mask): Redefine to not pass by address. ReportChristopher Faylor
calculated mask in debugging output. * sigproc.h (set_signal_mask): Reflect above change in declaration. * path.cc (mount_item::build_win32): Take path apart before feeding it to fnmunge. Throughout, change use of _reent_winsup()-> to _my_tls.locals. instead. Throughout, remove obsolete MT_SAFE/_CYG_THREAD_FAILSAFE considerations. Througout, add cygtls.h include. * Makefile.in (DLL_OFILES): Add cygtls.o. Add some more objects to the -fomit-frame-pointer list. * acconfig.h: Remove obsolete settings. * config.h.in: Ditto. * bsdlib.cc: Add cygtls.h include. * configure.in: Remove --enable-extra-threadsafe-checking. * configure: Regenerate. * cygtls.h (_local_storage): New struct renamed from _winsup_t (sic). (_threadinfo:local_clib): Add new field. (_threadinfo::locals): Ditto. (_threadinfo::init_thread): Accept second _reent * argument. (_threadinfo::call): Define as regparm. (CYGTLS_PADSIZE): Remove unnecessary slop. (_getreent): Define as a macro. * thread.h: Remove _CYG_THREAD_FAILSAFE and MT_SAFE stuff. (_winsup_t): Move to cygtls.h. (ResourceLocks::ResourceLocks): Eliminate empty constructor. (MTinterface::reents): Eliminate. (MTinterface::thread_self_key): Eliminate. (MTinterface::MTinterface): Eliminate. * dcrt0.cc: Include stdio.h for _impure_ptr initialization. (do_global_ctors): Remove run_ctors_p (sic) considerations. Don't call atexit here. (__main): Initialize destructors for user here. (dll_crt0_1): Accept a dummy argument. Don't call init_thread here. Don't set _impure_ptr here. Call do_global_ctors after more things have been initialized. (_dll_crt0): Define zeros buffer as max of needed size of CYGTLS_PADSIZE so that it can be used for two purposes while minimizing stack usage. Initialize _impure_ptr specifically, for speed. Call dll_crt0_1 with buffer argument. (cygwin_dll_init): Call dll_crt0_1 with dummy argument. * dtable.cc (dtable::find_unused_handle): Remove call to AssertResourceOwner. * exceptions.cc: Move _threadinfo stuff to new file. * cygtls.cc: New file. * gentls_offsets: Accommodate increasing complexity of cygtls.h. * hires.h (hires_base::~hires_base): Remove. * init.cc (dll_entry): Remove setting of reents. * thread.cc: Remove syslog.h include. (__getreent): Simplify to use _my_tls. (_reent_winsup): Delete. (AssertResourceOwner): Delete. (MTinterface::Init): Remove setting of _clib and _winsup, with all that entails. (MTinterface::fixup_after_fork): Ditto. (pthread::thread_init_wrapper): Ditto. Also remove call to set_tls_self_pointer. (pthread::set_tls_self_pointer): Eliminate. (pthread::get_tls_self_pointer): Just return _my_tls.tid; (__reent_t::init_clib): Eliminate. * tlsoffsets.h: Regenerate.
2003-09-07* signal.cc (nanosleep): Improve test for valid values. Round delay up toChristopher Faylor
resolution. Fix test for negative remainder. Use timeGetTime through gtod. (sleep): Round up return value. Christopher Faylor <cgf@redhat.com> * hires.h (HIRES_DELAY_MAX): Define. (hires_ms::minperiod): Declare static. (hires_ms::resolution): New. (hires_ms::dmsecs): New. (hires_ms::prime): Return UINT. (gtod): Declare. * times.cc (hires_ms::prime): Always calculate minperiod and set it to 1 in case of failure. Return minperiod. (hires_ms::resolution): Define. (hires_ms::~hires_ms): Delete. (hires_ms::usecs): Check minperiod to prime. (gtod) Define as global.
2003-09-06* hires.h (hires_ms::~hires_ms): Delete declaration.Christopher Faylor
* times.cc (hires_ms::~hires_ms): Delete definition..
2002-09-30* environ.cc (environ_init): Avoid a compiler warning.Christopher Faylor
* path.cc (path_conv::check): Ditto. * path.h (path_conv::operator int): Ditto. * regex/engine.c: Ditto throughout. * regex/regcomp.c: Ditto throughout. * regex/regexec.c: Ditto throughout.
2002-06-07* autoload.cc (timeGetDevCaps): Define new autoload function.Christopher Faylor
(timeGetTime): Ditto. (timeBeginPeriod): Ditto. (timeEndPeriod): Ditto. * hires.h (hires_base): New class. Renamed from hires. (hires_us): New class. (hires_ms): New class. * strace.cc (strace::microseconds): Use hires_us class. * times.cc (gettimeofday): Use hires-ms class. (hires_us::prime): Renamed from hires::prime. (hires_us::usecs): Renamed from hires:usecs. (hires_ms::prime): New method. (hires_ms::usecs): New method. (hires_ms::~hires_ms): New destructor.
2002-02-15* hires.h (hires::usecs): Rename from utime. Accept an argument.Christopher Faylor
* strace.cc (strace::microseconds): Use hires class for calculating times. * sync.h (new_muto): Use NO_COPY explicitly in declaration. * times.cc (gettimeofday): Reflect change in usecs argument. (hires::usecs): Ditto. Changed name from utime. * winsup.h (NO_COPY): Add nocommon attribute to force setting aside space for variable. * regcomp.c (REQUIRE): Add a void cast to bypass a warning.
2002-02-15* hires.h: New file.Christopher Faylor
* times.cc (gettimeofday): Use hires class for calculating current time. (hires::prime): New method. (hires::utime): Ditto.