Files
Noor Ahsan 79d102b2c4 iperf: Add version 2.0.4 (initial recipe)
* Imported from oe.dev commit id 0ff10ecb88de73074ae4857046643cef15dc4e97 and c10c33f86903c93611023197a7f812459c2dfe2d.
* Combined .inc and bb file from oe.dev and made a single bb file.
* Removed EXTRA_OECONF_append_epia = " --disable-threads" while importing as this should go in epia layer.

Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
2011-08-29 12:15:22 +05:00

23 lines
703 B
Diff

by Kirby Zhou < kirbyzhou \x40 sohu-rd.com >
using sched_yield to schedule other threads, so multiple iperf can run simultaneously
using usleep with delay-loop between 2 package is long than 1.25ms.
Upstream-Status: Inappropriate [not author]
--- iperf-2.0.4-4/compat/delay.cpp 2009-07-06 12:02:24.166276642 +0200
+++ iperf-2.0.4/compat/delay.cpp 2009-07-06 12:01:33.858384005 +0200
@@ -69,6 +69,13 @@ void delay_loop( unsigned long usec ) {
Timestamp now;
while ( now.before( end ) ) {
+ long diff = end.subUsec(now);
+ if (diff >= 1250) {
+ usleep(0);
+ }
+ if (diff >= 2) {
+ sched_yield();
+ }
now.setnow();
}
}