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.

Best regards
Naresh Kamboju
>
> Thanks
> Rishi
>>
> --
> Thanks & Regards
> Rishi
> LTP Maintainer
> IBM, LTC, Bangalore
> Please join IRC #ltp @ irc.freenode.net
>
>>Thanks,
>>-Garrett

------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to