travisg/lk — pull request #4 by zeusk (2012-10-11 17:35:48+00:00)
Title: Update kernel/timer.c

Remove some redundant code

In timer_cancel, We don't need to explicitly set timer callback and arg as NULL, They will be updated before/next time the timer is registered with us and inserted in queue.

In timer_tick, periodic variable is redundant and causes a bug where a timer will not be re-inserted into the queue if it changes from non-periodic to periodic inside the callback code, we must requeue based on timer data after callback is complete. If state did change from periodic to non-periodic, statement would still be false as periodic time is set to zero. If timer changed from non-periodic to periodic inside callback, it is never requeued.