From: Jan Kiszka <jan.kiszka@domain.hid>
To: Perrine Martignoni <perrmart@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Kernel access of bad area with rtdm_event_wait() (MPC8347)
Date: Thu, 21 Feb 2008 16:23:40 +0100 [thread overview]
Message-ID: <47BD977C.1040209@domain.hid> (raw)
In-Reply-To: <7289437c0802210658w29e21207q74f1cfdf36d6e17c@domain.hid>
Perrine Martignoni wrote:
> Hello,
>
> I work on a MPC8347 processor and I found out a problem with
> rtdm_event_wait(). I reproduce the problem with a simple code :
>
> *driver.c* :
> #include <rtdm/rtdm_driver.h>
>
> MODULE_AUTHOR("P.Martignoni");
> MODULE_LICENSE("GPL");
>
> #define DEV_FILE_NAME "DspDev"
> #define DRV_NAME "DspDrv"
>
> #define DEV_FILE_DSP "dspdev0"
>
> static rtdm_event_t s_ReadEvent;
>
> static int Open(struct rtdm_dev_context *p_Context,
> rtdm_user_info_t *p_UserInfo,
> int Oflags)
> {
> int ret = 0;
>
> rtdm_event_init(&s_ReadEvent,0);
>
> // generates an error : Oops : Kernel access of bad area, sig : 11 [#1]
> rtdm_event_wait(&s_ReadEvent);
General advice: switch on XENO_OPT_DEBUG_RTDM (and IPIPE_DEBUG_CONTEXT)
to catch service invocations from a wrong context, like here.
Your mistake: calling a blocking Xenomai services from non-rt context
(see your registration of Open in t_IdspDevice).
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2008-02-21 15:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 14:58 [Xenomai-help] Kernel access of bad area with rtdm_event_wait() (MPC8347) Perrine Martignoni
2008-02-21 15:23 ` Jan Kiszka [this message]
2008-02-22 7:58 ` Perrine Martignoni
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=47BD977C.1040209@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=perrmart@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.