Hello Sanjay, One suggestion - its probably better to precede the output lines with cpu no. As currently output from child processes are intermixed as below and difficult to co-relate.
jiffies are : 10000 usecs found 4 cpu(s) duration: 120 secs, #sleep: 1200, delay: 100000 us duration: 120 secs, #sleep: 1200, delay: 100000 us duration: 120 secs, #sleep: 1200, delay: 100000 us duration: 120 secs, #sleep: 1200, delay: 100000 us counter value 4072718528 test duration: 120.057526 secs deviation 0.000479 counter value 3914063589 test duration: 120.057335 secs counter value 4015937716 test duration: 120.057430 secs deviation 0.000479 deviation 0.000478 counter value 411037603 test duration: 120.062716 secs deviation 0.000523 -- Thanks, -Meraj On Fri, May 2, 2014 at 11:23 PM, Sanjay Singh Rawat <sanjay.ra...@linaro.org > wrote: > On Wednesday 30 April 2014 02:04 PM, Mohammad Merajul Islam Molla wrote: > >> Hello Sanjay, >> As far I know, if option argument is 0, the parent will wait for >> > > Looks like waiting is done if childs exit. I checked for the offlined CPU > case, if there are no child processes, waitpid returns -1. Setting errno as > "no child processes" > > specified child pid to terminate, its not for immediate return as in >> case of WNOHANG. This is probably the intended use of the code (author >> will be able to confirm). Changing 0 to WNOHANG macro will change the >> meaning of the code. >> Also, from header file - >> #define WNOHANG 0x00000001 >> > > sorry i referred wrong document > > WNOHANG is defined as 1, not zero. >> Which makes me think of two cases below - >> 1. If the real intended purpose is to not to wait infinitely, replacing >> > [...] >
_______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev