2b72887ac8
when calling clocks too early in DLL init, the vtables are not correctly set up for some reason. Calls to init() from now() fail because the init pointer in the vtable is NULL. Real life example is mintty which runs into a minor problem at startup, triggering a system_printf call. Strace is another problem, it's called the first time prior to any class initialization. Workaround is to make sure that no virtual methods are called in an early stage. Make init() non-virtual and convert resolution() to a virtual method instead. Add a special non-virtual clk_monotonic_t::strace_usecs. While at it: - Inline internal-only methods. - Drop the `inited' member. Convert period/ticks_per_sec toa union. Initialize period/ticks_per_sec via InterlockeExchange64. - Fix GetTickCount64 usage. No, it's not returning ticks but milliseconds since boot (unbiased). - Fix comment indentation. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> |
||
---|---|---|
.. | ||
CVSChangeLogs.old | ||
cygserver | ||
cygwin | ||
doc | ||
lsaauth | ||
testsuite | ||
utils | ||
CONTRIBUTORS | ||
COPYING | ||
COPYING.LIB | ||
CYGWIN_LICENSE | ||
Makefile.common | ||
Makefile.in | ||
README | ||
acinclude.m4 | ||
aclocal.m4 | ||
autogen.sh | ||
c++wrap | ||
ccwrap | ||
config.guess | ||
config.sub | ||
configure | ||
configure.ac | ||
configure.cygwin | ||
install-sh |
README
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin