All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriele Moabiti <gabmoa@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>,
	Jan Kiszka <jan.kiszka@domain.hid>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] trap exceptions in user
Date: Fri, 24 Oct 2008 13:53:27 +0000 (GMT)	[thread overview]
Message-ID: <258091.63324.qm@domain.hid> (raw)

[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1869 bytes --]

             reply	other threads:[~2008-10-24 13:53 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-24 13:53 Gabriele Moabiti [this message]
2008-10-24 17:43 ` [Xenomai-help] trap exceptions in user Gilles Chanteperdrix
2008-10-24 17:44   ` Gilles Chanteperdrix
  -- strict thread matches above, loose matches on Subject: below --
2008-10-24 19:17 Gabriele Moabiti
2008-10-26 23:49 ` Gilles Chanteperdrix
2008-10-24 15:30 Gabriele Moabiti
2008-10-15 15:30 Gabriele Moabiti
2008-10-15 15:39 ` Jan Kiszka
2008-10-14 10:01 Gabriele Moabiti
2008-10-14 10:21 ` Jan Kiszka
2008-10-14 12:13   ` Gilles Chanteperdrix
2008-10-13  9:55 Gabriele Moabiti
2008-10-11 19:32 Gabriele Moabiti
2008-10-11 19:34 ` Gilles Chanteperdrix
2008-10-11 21:35 ` Philippe Gerum
2008-10-10 17:57 Gabriele Moabiti
2008-10-10 16:02 Gabriele Moabiti
2008-10-10 16:04 ` Gilles Chanteperdrix
2008-10-11 11:24 ` Gilles Chanteperdrix
2008-10-10 15:24 Gabriele Moabiti
2008-10-10 15:38 ` Gilles Chanteperdrix
2008-10-10 13:50 Gabriele Moabiti
2008-10-10 14:00 ` Gilles Chanteperdrix
2008-10-08 11:32 Gabriele Moabiti
2008-10-08 12:29 ` Gilles Chanteperdrix
2008-10-08 10:34 Gabriele Moabiti
2008-10-08 10:50 ` Gilles Chanteperdrix
     [not found] <296620.67855.qm@domain.hid>
2008-10-08 10:09 ` Gilles Chanteperdrix
2008-10-03 12:30 Gabriele Moabiti
2008-10-03 14:58 ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=258091.63324.qm@domain.hid \
    --to=gabmoa@domain.hid \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=jan.kiszka@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.