I have upgraded the kernel to 2.6.24 + xenomai 2.4.5
The custom exception doesn't work as I expected.
static rthal_trap_handler_t old_trap_handler;
In an the kernel driver I set:
old_trap_handler = rthal_trap_catch(&custom_trap_fault);
the custom handler is:
static int custom_trap_fault(unsigned event, unsigned domid, void *data)
{
if (is_my_application(...) && i_want_to_manage_exception(event)) {
ManageCustomExceptions();
return RTHAL_EVENT_STOP; /* 1=STOP */
}
return ((rthal_trap_handler_t) old_trap_handler)(event, domid, data);
}
The exception 7 is passed to the xenomai exception handler (TS flag).
I consider now ManageCustomExceptions a function that do nothing.
INT 3 or 1
Adeos does what I expected. It returns and nothing done.
The program continue happy to the next instruction.
INT 0 (divide error) or 16 (fpu exception)
The system hangs.
When I pass to xenomai It doesn't handle the exception and relax the thread an
propagate
to linux (I think as expected to do).
[in the xnpod_trap_fault, xnpod_shadow_p is true then xnshadow_relax is
performed so the
routine return 0 (RTHAL_EVENT_PROPAGATE)]
Is it possible to customize such exceptions? Am I missing something?
Gabriele
Scopri il blog di Yahoo! Mail:
Trucchi, novità e scrivi la tua opinione.
http://www.ymailblogit.com/blog_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help