]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fix the thread retrieving the time to the same processor for consistency.
authorDanny Mayer <mayer@ntp.org>
Thu, 23 Jan 2003 04:33:11 +0000 (23:33 -0500)
committerDanny Mayer <mayer@ntp.org>
Thu, 23 Jan 2003 04:33:11 +0000 (23:33 -0500)
bk: 3e2f708741CBjmUNzeQ4YIIqOMGjtQ

ports/winnt/ntpd/nt_clockstuff.c

index 2982b9d9e7c3fb6749356af5223a6c3a16b04a14..dca4427a599b2f2b4749fe2f326421b990a78a13 100644 (file)
@@ -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 */
+
 }