[PATCH 2/3] ssdd: remove sleeps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There two sleep functions which ensure that the forked function sleeps
and does not spin until everythin is setup. There is no need for that,
the scheduler will take care of that anyway. Also that sleep may
complete before or after the testcase starts. If it completes afterwards
then the testcase waits to start so…

Remove the sleep, it does change the outcome of the testcase.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
 src/ssdd/ssdd.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/ssdd/ssdd.c b/src/ssdd/ssdd.c
index 9b85dfa9d2236..68a426266dd90 100644
--- a/src/ssdd/ssdd.c
+++ b/src/ssdd/ssdd.c
@@ -132,12 +132,8 @@ static void sigchld(int sig, unused siginfo_t * info, unused void *arg)
 
 static void child_process(void)
 {
-	unused volatile int i;
-
-	/* wait for ptrace attach */
-	usleep(100000);
 	while (1)
-		i = 0;
+		;
 }
 
 static int forktests(int testid)
@@ -170,9 +166,6 @@ static int forktests(int testid)
 		exit(1);
 	}
 
-	/* give both our child and parent time to set things up */
-	usleep(125000);
-
 	/*
 	 * Attach to the child.
 	 */
-- 
2.20.1




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux