void rthal_timer_release(int cpu) { unsigned long flags; if (cpu > 0) return; rthal_timer_set_irq(RTHAL_HOST_TIMER_IRQ); ipipe_tune_timer(0, IPIPE_RESET_TIMER); flags = rthal_critical_enter(NULL); rthal_irq_release(RTHAL_TIMER_IRQ); rthal_irq_release(RTHAL_HOST_TIMER_IRQ); rthal_critical_exit(flags); }
int rthal_timer_request(void (*handler) (void), int cpu) { unsigned long flags; if (cpu > 0) goto out; flags = rthal_critical_enter(NULL); rthal_irq_release(RTHAL_TIMER_IRQ); ipipe_tune_timer(0, IPIPE_GRAB_TIMER); if (rthal_irq_request(RTHAL_TIMER_IRQ, (rthal_irq_handler_t) handler, NULL, NULL) < 0) { rthal_critical_exit(flags); return -EINVAL; } if (rthal_irq_request(RTHAL_HOST_TIMER_IRQ, &rthal_adjust_before_relay, NULL, NULL) < 0) { rthal_critical_exit(flags); return -EINVAL; } rthal_critical_exit(flags); rthal_timer_set_irq(RTHAL_TIMER_IRQ); out: return 0; }
void rthal_timer_release(int cpu) { ipipe_release_tickdev(cpu); if (--cpu_timers_requested > 0) return; #ifdef CONFIG_SMP rthal_irq_release(RTHAL_TIMER_IPI); #endif /* CONFIG_SMP */ rthal_irq_release(RTHAL_TIMER_IRQ); if (rthal_ktimer_saved_mode == KTIMER_MODE_PERIODIC) rthal_timer_set_periodic(); else if (rthal_ktimer_saved_mode == KTIMER_MODE_ONESHOT) rthal_timer_set_oneshot(0); }
void rthal_timer_release(int cpu) { #ifdef CONFIG_GENERIC_CLOCKEVENTS ipipe_release_tickdev(cpu); #endif rthal_irq_release(RTHAL_TIMER_IRQ); if (rthal_ktimer_saved_mode == KTIMER_MODE_PERIODIC) rthal_timer_set_periodic(); else if (rthal_ktimer_saved_mode == KTIMER_MODE_ONESHOT) /* We need to keep the timing cycle alive for the kernel. */ rthal_trigger_irq(RTHAL_TIMER_IRQ); }
void rthal_timer_release(int cpu) { #ifdef CONFIG_IPIPE_CORE rthal_tickdev_release(cpu); #endif /* CONFIG_IPIPE_CORE */ if (--cpu_timers_requested > 0) return; #ifndef CONFIG_IPIPE_CORE rthal_irq_release(RTHAL_TIMER_IRQ); #endif /* !CONFIG_IPIPE_CORE */ rthal_timer_set_periodic(); }
static int comedi_rt_release_irq(struct comedi_irq_struct *it) { rthal_irq_disable(it->irq); rthal_irq_release(it->irq); return 0; }
void rthal_timer_release(int cpu) { ipipe_release_tickdev(cpu); rthal_irq_release(RTHAL_TIMER_IRQ); __ipipe_release_hrtimer(); }