Example #1
0
/**
 * @fn void xntimer_release_hardware(void)
 * @brief Release hardware timers.
 *
 * Releases hardware timers previously grabbed by a call to
 * xntimer_grab_hardware().
 *
 * @coretags{secondary-only}
 */
void xntimer_release_hardware(void)
{
	int cpu;

	/*
	 * We must not hold the nklock while stopping the hardware
	 * timer, since this could cause deadlock situations to arise
	 * on SMP systems.
	 */
	for_each_realtime_cpu(cpu)
		ipipe_timer_stop(cpu);

	xntimer_release_ipi();

#ifdef CONFIG_XENO_OPT_STATS
	xnintr_destroy(&nktimer);
#endif /* CONFIG_XENO_OPT_STATS */
}
Example #2
0
int rt_intr_delete(RT_INTR *intr)
{
	int err = 0, rc = XNSYNCH_DONE;
	spl_t s;

	if (xnpod_asynch_p())
		return -EPERM;

	xnlock_get_irqsave(&nklock, s);

	intr = xeno_h2obj_validate(intr, XENO_INTR_MAGIC, RT_INTR);

	if (!intr) {
		err = xeno_handle_error(intr, XENO_INTR_MAGIC, RT_INTR);
		xnlock_put_irqrestore(&nklock, s);
		return err;
	}

	removeq(intr->rqueue, &intr->rlink);

#ifdef CONFIG_XENO_OPT_PERVASIVE
	rc = xnsynch_destroy(&intr->synch_base);
#endif /* CONFIG_XENO_OPT_PERVASIVE */

	if (intr->handle)
		xnregistry_remove(intr->handle);

	xeno_mark_deleted(intr);

	xnlock_put_irqrestore(&nklock, s);

	err = xnintr_destroy(&intr->intr_base);

	if (rc == XNSYNCH_RESCHED)
		/* Some task has been woken up as a result of the deletion:
		   reschedule now. */
		xnpod_schedule();

	return err;
}
Example #3
0
void cleanup_module(void)
{
	del_timer(&timer);
	xnintr_destroy(&intr);
	printk("FINAL MAX INTERRUPT LATENCY: %d (us)\n", ((LATCH - tmrcnt)*1000000 + CLOCK_TICK_RATE/2)/CLOCK_TICK_RATE);
}