OSDN Git Service

* autoload.cc (winmm): Remove time functions. Don't treat
authorcorinna <corinna>
Tue, 29 Mar 2011 10:21:28 +0000 (10:21 +0000)
committercorinna <corinna>
Tue, 29 Mar 2011 10:21:28 +0000 (10:21 +0000)
commit62eaf5c2b93a789853787af8916379f8898e5d2a
tree2def0c8b19b3c0fbb9b5449e5c51d333f3e117b9
parent6fb293a25dfd6ff2d79632923e1aed78d94c6545
* autoload.cc (winmm): Remove time functions.  Don't treat
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.
winsup/cygwin/ChangeLog
winsup/cygwin/autoload.cc
winsup/cygwin/hires.h
winsup/cygwin/ntdll.h
winsup/cygwin/path.cc
winsup/cygwin/times.cc