From 7ec1259bd719cbccc35d25862f8c8b0659f17964 Mon Sep 17 00:00:00 2001 From: kaustubhprabhu Date: Thu, 6 Aug 2009 20:29:22 +0000 Subject: [PATCH] added setpriority to increase the priority of execution --- src/iperf_api.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/iperf_api.c b/src/iperf_api.c index b06e2d1..034aaa9 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -1695,6 +1695,17 @@ main(int argc, char **argv) struct iperf_test *test; int port= 5001; + + //increasing the priority of the process to minimise packet generation + //delay + int rc = setpriority(PRIO_PROCESS,0, -15); + if(rc < 0) + { + perror("setpriority:"); + printf("setting priority to valid level\n"); + rc = setpriority(PRIO_PROCESS,0, 1); + } + while (1) { test = iperf_new_test();