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
This commit is contained in:
parent
7ad5b78d24
commit
e4138c6a8c
18
net/iperf/patches/001-thread_library_fix.patch
Normal file
18
net/iperf/patches/001-thread_library_fix.patch
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user