From e4138c6a8ccb7e9b729a1a404b97c11739210e54 Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 11 Sep 2007 06:53:10 +0000 Subject: [PATCH] Add the thread fix as suggested in http://dast.nlanr.net/Projects/Iperf2.0/patch-iperf-linux-2.6.21.txt git-svn-id: svn://svn.openwrt.org/openwrt/packages@8742 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/iperf/patches/001-thread_library_fix.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 net/iperf/patches/001-thread_library_fix.patch 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