On Wed, Mar 3, 2010 at 3:49 AM, naresh kamboju <[email protected]> wrote: > On Wed, Mar 3, 2010 at 5:12 PM, Garrett Cooper <[email protected]> wrote: >> On Wed, Mar 3, 2010 at 3:33 AM, naresh kamboju <[email protected]> >> wrote: >>> On Wed, Mar 3, 2010 at 3:15 PM, Rishikesh K Rajak >>> <[email protected]> wrote: >>>> On Wed, Mar 03, 2010 at 01:18:50AM -0800, Garrett Cooper wrote: >>>>> Uh, hold on a sec before we call it good... >>>> >>>> oh ok, holiding on for bit. >>>> >>>> Naresh, can you please send a patch with incorporating garret's comment >>>> ? >>>>>>> + /* Step 3 Implementation */ >>>>>>> /* Make sure the two children has been waiting */ >>>>>>> - /*do { >>>>>>> - sleep(1); >>>>>>> + do { >>>>>>> sem_getvalue(sem_1, &val); >>>>>>> //printf("val = %d\n", val); >>>>>>> } while (val != 1); >>>>>>> - */ >>>>> >>>>> Please provide another patch with a limit to this -- >>> >>> Garrett, >>> >>> When sem_wait is called 'val' value will be decremented by one. >>> To ensure that sem_wait is called, we are checking 'val' value by >>> calling sem_getvalue(). in this case we don’t need to decrement the >>> values by --. IIUC. >>> (snip) >>> OTOH, >>>>> I get annoyed >>>>> with tests that have infinite loops in them because the underlying >>>>> functionality is broken. >>> I agree with you, having infinite loops in test case is not a good. >>> However, in this patch while loop is not infinite loop. It is a >>> conditional loop with finite value. >>> >>> Please let me know if you have any issues. >> >> The problem was that it wasn't failing properly as stated in the >> manpage on mips* (was decrementing past 0) and it was blocking >> indefinitely. Hence I had to yank those tests from the default run. > do you mean, after applying above patch you have noticed these kind of > behavior?
Not with this patch; I've seen this kind of behavior in general under odd conditions with my former team's embedded setup running tests with POSIX semaphores, so I don't doubt that others could run into the similar functional issues given the right conditions. Thanks, -Garrett ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
