From: Florian Fainelli Date: Tue, 11 Sep 2007 06:53:10 +0000 (+0000) Subject: Add the thread fix as suggested in http://dast.nlanr.net/Projects/Iperf2.0/patch... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=847d95e57cc6523671d060b3498c8c10eccac7cb;p=openwrt%2Fsvn-archive%2Fpackages.git Add the thread fix as suggested in dast.nlanr.net/Projects/Iperf2.0/patch-iperf-linux-2.6.21.txt SVN-Revision: 8742 --- diff --git a/net/iperf/patches/001-thread_library_fix.patch b/net/iperf/patches/001-thread_library_fix.patch new file mode 100644 index 000000000..189c57b71 --- /dev/null +++ b/net/iperf/patches/001-thread_library_fix.patch @@ -0,0 +1,18 @@ +--- iperf-2.0.2/compat/Thread.c 2005-05-03 08:15:51.000000000 -0700 ++++ iperf-2.0.2.new/compat/Thread.c 2007-06-04 10:41:11.000000000 -0700 +@@ -405,9 +405,13 @@ + 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