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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- Steve

Signed-off-by: Steven Rostedt <[email protected]>

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux