From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 References: In-Reply-To: From: Richard Weinberger Date: Fri, 29 Apr 2022 21:01:33 +0200 Message-ID: Subject: Re: Interrupt handler illicit call Content-Type: text/plain; charset="UTF-8" List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: C Smith Cc: Xenomai List On Fri, Apr 29, 2022 at 9:04 AM C Smith via Xenomai wrote: > int Lp_port_handler(rtdm_irq_t *irq_handle_p) > { > static int err; > unsigned long next; > rtdm_irq_t *handle_p; > > handle_p = rtdm_irq_get_arg(irq_handle_p, rtdm_irq_t); > > next = rtdm_clock_read(); > // do some timing calculations with 'next' var here ... > err = rtdm_irq_enable(handle_p); //re-enable this for subsequent interrupts You don't need this. Unconditionally enabling the interrupt line will confuse the IRQ subsystem. > return 0; Please use RTDM_IRQ_HANDLED here instead of raw values. > } Thanks, //richard