| 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.
|