iperf:
[openwrt/svn-archive/archive.git] / net / iperf / patches / 001-thread_library_fix.patch
1 Index: iperf-2.0.2/compat/Thread.c
2 ===================================================================
3 --- iperf-2.0.2.orig/compat/Thread.c 2007-09-26 15:01:48.000000000 +0200
4 +++ iperf-2.0.2/compat/Thread.c 2007-09-26 15:01:49.000000000 +0200
5 @@ -405,9 +405,13 @@
6 void thread_rest ( void ) {
7 #if defined( HAVE_THREAD )
8 #if defined( HAVE_POSIX_THREAD )
9 - // TODO add checks for sched_yield or pthread_yield and call that
10 - // if available
11 +
12 +#if defined( _POSIX_PRIORITY_SCHEDULING )
13 + sched_yield();
14 +#else
15 usleep( 0 );
16 +#endif
17 +
18 #else // Win32
19 SwitchToThread( );
20 #endif