[netperf-dev] netperf2 commit notice r586 - trunk/src

raj at netperf.org raj at netperf.org
Wed May 30 15:53:02 PDT 2012


Author: raj
Date: 2012-05-30 15:53:02 -0700 (Wed, 30 May 2012)
New Revision: 586

Modified:
   trunk/src/netlib.c
Log:
more windows tweaks from jonathan

Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c	2012-05-22 23:51:27 UTC (rev 585)
+++ trunk/src/netlib.c	2012-05-30 22:53:02 UTC (rev 586)
@@ -1058,11 +1058,10 @@
       /* Give the other threads time to notice that times_up has
 	 changed state before taking the harsh step of closing the
 	 sockets. */
-#ifdef WIN32
       timed_out=0;
-#endif
       if (WaitForSingleObject(hAlarm, PAD_TIME/2*1000) ==
 	  WAIT_TIMEOUT) {
+        timed_out=1;
 	/* We have yet to find a good way to fully emulate
 	   the effects of signals and getting EINTR from
 	   system calls under winsock, so what we do here is
@@ -1070,9 +1069,6 @@
 	   It is rather kludgy, but should be sufficient to
 	   get this puppy shipped.  The concept can be
 	   attributed/blamed :) on Robin raj 1/96 */
-#ifdef WIN32
-    timed_out=1;
-#endif
 	
 	if (win_kludge_socket != INVALID_SOCKET) {
 	  HandlesClosedFlags |= 1;
@@ -3566,7 +3562,9 @@
   sec     = time2.tv_sec - time1.tv_sec;
   usec    = time2.tv_usec - time1.tv_usec;
   lib_elapsed     = (float)sec + ((float)usec/(float)1000000.0);
-  /* if (timed_out) lib_elapsed-=PAD_TIME/2; */
+#ifdef WIN32
+  if (timed_out) lib_elapsed-=PAD_TIME/2;
+#endif
   *elapsed = lib_elapsed;
 
 }



More information about the netperf-dev mailing list