From: Sven Dietricht Date: Wed, 26 Jul 2000 22:27:02 +0000 (-0000) Subject: ntpd.c: X-Git-Tag: NTP_4_0_99_M~254 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57db3ae7ea2a9ba4dbc2d4b4cc414694efdb7939;p=thirdparty%2Fntp.git ntpd.c: Clear out WINNT priority code; move to ports/winnt/ntpd/win32_io.c ChangeLog: Windows NT cleanup. bk: 397f65b6I2XyIHi9k44K4E5_waCjHA --- diff --git a/ChangeLog b/ChangeLog index 3a9d5de2d7..0551be401f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-07-26 Sven Dietrich + + * ntpd/ntpd.c: remove WINNT priority adjustment to the ports/winnt area + where it does not clutter up the main distribution. + 2000-07-24 Harlan Stenn * ntpd/ntp_proto.c (receive): dstadr_sin needs higher visibility diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c index 236ed06d1b..897be5afc4 100644 --- a/ntpd/ntpd.c +++ b/ntpd/ntpd.c @@ -234,32 +234,7 @@ set_process_priority(void) priority_done); #ifdef SYS_WINNT - DWORD SingleCPUMask = 0; - DWORD ProcessAffinityMask, SystemAffinityMask; - if (!GetProcessAffinityMask(GetCurrentProcess(), &ProcessAffinityMask, &SystemAffinityMask)) - msyslog(LOG_ERR, "GetProcessAffinityMask: %m"); - else { - SingleCPUMask = 1; -# ifdef DEBUG - msyslog(LOG_INFO, "System AffinityMask = %x", SystemAffinityMask ); -# endif - } - while (SingleCPUMask && !(SingleCPUMask & SystemAffinityMask)) { - SingleCPUMask = SingleCPUMask << 1; - } - - if (!SingleCPUMask) - msyslog(LOG_ERR, "Can't set Processor Affinity Mask"); - else if (!SetProcessAffinityMask(GetCurrentProcess(), SingleCPUMask)) - msyslog(LOG_ERR, "SetProcessAffinityMask: %m"); -# ifdef DEBUG - else msyslog(LOG_INFO,"ProcessorAffinity Mask: %x", SingleCPUMask ); -# endif - - if (!SetPriorityClass(GetCurrentProcess(), (DWORD) REALTIME_PRIORITY_CLASS)) - msyslog(LOG_ERR, "SetPriorityClass: %m"); - else - ++priority_done; + priority_done += NT_set_process_priority(); #endif #if defined(HAVE_SCHED_SETSCHEDULER)