rpms/iperf/EL-5 iperf-2.0.2-usleep.patch,NONE,1.1

Gabriel L. Somlo (somlo) fedora-extras-commits at redhat.com
Mon Dec 10 20:49:05 UTC 2007


Author: somlo

Update of /cvs/pkgs/rpms/iperf/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31101

Added Files:
	iperf-2.0.2-usleep.patch 
Log Message:
forgot to add usleep patch before previous commit


iperf-2.0.2-usleep.patch:

--- NEW FILE iperf-2.0.2-usleep.patch ---
diff -NarU5 iperf-2.0.2.orig/compat/Thread.c iperf-2.0.2/compat/Thread.c
--- iperf-2.0.2.orig/compat/Thread.c	2005-05-03 11:15:51.000000000 -0400
+++ iperf-2.0.2/compat/Thread.c	2007-10-27 20:17:10.000000000 -0400
@@ -403,13 +403,17 @@
  * is not guarenteed to actually rest.
  * ------------------------------------------------------------------- */
 void thread_rest ( void ) {
 #if defined( HAVE_THREAD )
 #if defined( HAVE_POSIX_THREAD )
-    // TODO add checks for sched_yield or pthread_yield and call that
-    // if available
+
+#if defined( _POSIX_PRIORITY_SCHEDULING )
+    sched_yield();
+#else
     usleep( 0 );
+#endif
+
 #else // Win32
     SwitchToThread( );
 #endif
 #endif
 }




More information about the fedora-extras-commits mailing list