On Sun, Jan 16, 2011 at 6:09 AM, Cyril Hrubis <[email protected]> wrote:
> Hi!
>> > Hi!
>> > Garrett could you, pretty please, review/commit the patch.
>>
>> Just for future reference:
>>
>> 1. All variables static to main are pre-initialized to 0 by default
>> according to ANSI-C (see: http://en.wikipedia.org/wiki/.bss ) .
>> 2. I removed the printf's for sysconf(_SC_CPUTIME) because it was
>> unnecessary.
>> 3. The sysconf call for the CLOCK_THREAD_CPUTIME_ID was wrong.
>> 4. sysconf should always return -1 when unsupported, not 0.
>>
>> Could you please provide a diff from the version I'm about ready to
>> commit so I can determine what needs to be fixed, and why?
Hmm.. I missed the patch but basically merged your original changes
from your first patch.
> The outstanding problems are:
>
> You should not call printf() from signal handler.
Done.
> Misplaced whitespace after while (!caught_signal) ;
Both of us are wrong. K&R says it should be:
while (!caught_signal)
; /* With the correct amount of indentation here of course. */
LKML always defers to K&R unless stated otherwise.
> You should get rather difference on cputime timers than on system timers
> that count's time rather than proces cpu time.
Done.
> Patch for latest git attached.
Thanks!
-Garrett
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list