[PATCH 01/02 -rt] Allow for HRTIMER_RESTART in a CB_IRQSAFEcallback.

From: Steven Rostedt
Date: Mon Apr 03 2006 - 11:24:54 EST


This patch simply requeues a CB if HRTIMER_RESTART is set in CB_IRQSAFE
hrtimer_interrupt.

-- Steve

Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>

Index: linux-2.6.16-rt12/kernel/hrtimer.c
===================================================================
--- linux-2.6.16-rt12.orig/kernel/hrtimer.c 2006-04-02 16:06:52.000000000 -0400
+++ linux-2.6.16-rt12/kernel/hrtimer.c 2006-04-03 10:57:18.000000000 -0400
@@ -838,8 +838,10 @@ int hrtimer_interrupt(void)
if (timer->mode == HRTIMER_CB_IRQSAFE) {
int ret = timer->function(timer);

- BUG_ON(ret != HRTIMER_NORESTART);
- timer->node.rb_parent = HRTIMER_INACTIVE;
+ if (ret == HRTIMER_RESTART)
+ enqueue_hrtimer(timer, base);
+ else
+ timer->node.rb_parent = HRTIMER_INACTIVE;
} else {
hrtimer_add_cb_pending(timer, base);
raise = 1;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/