DOURNES Guillaume wrote:
> Since I add the watchdog option in my kernel configuration, The software 
> doesn't block.
> But I obtain an EPREM (-1) error on the second call of rtdm_event_timedwait, 
> and in dmesg : Xenomai: assertion failed at 
> kernel/xenomai/skins/rtdm/drvlib.c:919 (!xnpod_unblockable_p()).

See, that is interesting.

> I don't understand why I have this error, because the rtdm_event_timedwait is 
> used as the 16550A rtserial rtdm driver. And I use this rtserial driver, and 
> it works.
> Note that this problem doesn't appears when I call rt_task_suspend just after 
> my rtdm_event_timedwait, and I resume the task by a gets.

After having a look at your driver source meanwhile, the problem is that
you register your IOCTL handler also for handling invocation from non-RT
(precisely: "secondary") context. But rtdm_event_timedwait always
requires primary (RT) context. That is something you either have to
check in the IOCTL handler before trying to block a caller - or you
simply do not register for nrt_ioctl (or use a different handler for the
set of IOCTLs in that context).

The reason that suspending the caller made this issue go away was that
you have several plain Linux services in your RT loop that switches the
caller automatically to secondary mode. Thus the first IOCTL succeeded,
but the second failed after re-entering it now as a plain Linux caller.

HTH,
Jan

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to