For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > August 2005 > Re: kernel timer









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: kernel timer
Maxim Yegorushkin

2005-08-24, 3:57 am


martinm69x@hotmail.com wrote:
> Hey all,
>
> I've been working on the code for a kernel timer which will report real
> time, CPU time, user time and kernel time on the operation of fibonacci
> method.
>
> The way im doing it is keeping track of the parent and two child times
> (using fork()).
>
> I can get parent times to come up, however i do not think they are
> correct, and i can not get child times to come up at all. I think in
> the signal handler methods i have to somehow restart the timer or
> signal, but i am not entirely sure how to.
>
> All the code is below, can someone please assist me. Don't worry about
> the delta_time method.


I just skimmed through your code and noticed that you set the timers
before forking.

http://www.opengroup.org/onlinepubs...tions/fork.html

It says: Interval timers shall be reset in the child process.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com