]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Merge pogo.udel.edu:/pogo/users/hart/ntp-dev-873
authorDave Hart <hart@ntp.org>
Fri, 20 Mar 2009 02:29:49 +0000 (02:29 +0000)
committerDave Hart <hart@ntp.org>
Fri, 20 Mar 2009 02:29:49 +0000 (02:29 +0000)
into  pogo.udel.edu:/pogo/users/hart/ntp-dev-pull

bk: 49c2ff9dLFi6xoc_VJtiJCZb7tWxgg

1  2 
ChangeLog
ntpd/ntp_io.c
ports/winnt/ntpd/ntp_iocompletionport.c

diff --cc ChangeLog
index a9beb10d42676db2569766480eec6d26ad0f4b34,e57542c46a717a421aeae85a7ef0be6f815a63d5..a905d95055f1a793db3ca67d4a7fba386e9e105f
+++ b/ChangeLog
@@@ -1,7 -1,4 +1,8 @@@
+ * [Bug 873] Windows serial refclock proper TTY line discipline emulation
 +* [Bug 1117] Deferred interface binding under Windows works only correctly
 +  if FORCE_DNSRETRY is defined
 +* [BUG 1124] Lock QueryPerformanceCounter() client threads to same CPU
 +* [Bug 1014] Enable building with VC9 (in Visual Studio 2008, Visual C++ 2008, or SDK)
  (4.2.5p158) 2009/01/30 Released by Harlan Stenn <stenn@ntp.org>
  * Fix [CID 72], a typo introduced at the latest fix to prettydate.c.
  (4.2.5p157) 2009/01/26 Released by Harlan Stenn <stenn@ntp.org>
diff --cc ntpd/ntp_io.c
Simple merge
index 16f8866b57f3d582726b3644daab038c90c498ee,7734a848b08b0ee3cabf4b62b801270386e0d994..b60ef639330043dc2ca9bc7ff03767441db8d0d4
@@@ -42,9 -43,16 +43,19 @@@ typedef struct IoCompletionInfo 
  #define       recv_buf        buff_space.rbuf
  #define       trans_buf       buff_space.tbuf
  
+ #if !defined( _W64 )
+   /*
+    * if ULONG_PTR needs to be defined then the build environment
+    * is pure 32 bit Windows. Since ULONG_PTR and DWORD have 
+    * the same size in 32 bit Windows we can safely define
+    * a replacement.
+    */
+   typedef DWORD ULONG_PTR;
+ #endif
 +/* in nt_clockstuff.c */
 +extern void lock_thread_to_processor(HANDLE);
 +
  /*
   * local function definitions
   */
@@@ -147,18 -149,12 +152,21 @@@ iocompletionthread(void *NotUsed
        BOOL bSuccess = FALSE;
        int errstatus = 0;
        DWORD BytesTransferred = 0;
-       DWORD Key = 0;
+       ULONG_PTR Key = 0;
        IoCompletionInfo * lpo = NULL;
+       u_long time_next_ifscan_after_error = 0;
+       /* UNUSED_ARG(NotUsed); */
  
 +      /*
 +       *      socket and refclock receive call gettimeofday()
 +       *      so the I/O thread needs to be on the same 
 +       *      processor as the main and timing threads
 +       *      to ensure consistent QueryPerformanceCounter()
 +       *      results.
 +       */
 +      lock_thread_to_processor(GetCurrentThread());
 +
        /*      Set the thread priority high enough so I/O will
         *      preempt normal recv packet processing, but not
         *      higher than the timer sync thread.