8d794e4bce
* Split into two packages. One without threads support and one with multithread support (#2432) * Refresh patches git-svn-id: svn://svn.openwrt.org/openwrt/packages@9036 3c298f89-4303-0410-b956-a3cf2f4a3e73
21 lines
596 B
Diff
21 lines
596 B
Diff
Index: iperf-2.0.2/compat/Thread.c
|
|
===================================================================
|
|
--- iperf-2.0.2.orig/compat/Thread.c 2007-09-26 15:01:48.000000000 +0200
|
|
+++ iperf-2.0.2/compat/Thread.c 2007-09-26 15:01:49.000000000 +0200
|
|
@@ -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
|