From: Danny Mayer Date: Thu, 23 Jan 2003 04:33:11 +0000 (-0500) Subject: Fix the thread retrieving the time to the same processor for consistency. X-Git-Tag: NTP_4_1_80_RC1~101^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb5f4bfde2216d7358f55e2755fa76ed27769b8b;p=thirdparty%2Fntp.git Fix the thread retrieving the time to the same processor for consistency. bk: 3e2f708741CBjmUNzeQ4YIIqOMGjtQ --- diff --git a/ports/winnt/ntpd/nt_clockstuff.c b/ports/winnt/ntpd/nt_clockstuff.c index 2982b9d9e7..dca4427a59 100644 --- a/ports/winnt/ntpd/nt_clockstuff.c +++ b/ports/winnt/ntpd/nt_clockstuff.c @@ -189,6 +189,19 @@ void init_winnt_time(void) { (float) (units_per_tick / 10)); msyslog(LOG_INFO, "Adjustment rate %5.3f ppm/s", ppm_per_adjust_unit); #endif + + /*++++ Gerhard Junker + * see Platform SDK for QueryPerformanceCounter + * On a multiprocessor machine, it should not matter which processor is called. + * However, you can get different results on different processors due to bugs in the BIOS or the HAL. + * To specify processor affinity for a thread, use the SetThreadAffinityMask function. + * ... we will hope, the apc routine will run on the same processor + */ + + SetThreadAffinityMask(GetCurrentThread(), 1L); + + /*---- Gerhard Junker */ + }