From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Fabien MAHOT <fabien.mahot@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem with time-out ends
Date: Sat, 31 May 2008 00:05:48 +0200 [thread overview]
Message-ID: <18496.31292.674733.417262@domain.hid> (raw)
In-Reply-To: <13639.81.252.86.91.1212153659.squirrel@domain.hid>
[-- Attachment #1: message body and .signature --]
[-- Type: text/plain, Size: 1649 bytes --]
Fabien MAHOT wrote:
> > On Thu, May 29, 2008 at 1:26 PM, Fabien MAHOT
> > <fabien.mahot@domain.hid> wrote:
> >> I succeed to reduce my test program.
> >> Now, I ve got two xenomai threads.
> >> threadDisplay (prio : 70) : locks a mutex (conflict_lock mutex) and
> >> passes
> >> between Xenomai and Linux domain. (call to sleep())
> >> threadTimeOut (prio : 80) : Starts one timeout of 5ms and tries to lock
> >> the mutex taken by threadDisplay. (Priority Inheritance)
> >>
> >> threadTimeOut waits the conflict_lock unlock of threadDisplay. With
> >> priority inheritance, threadTimeOut gives its priority to threadDisplay.
> >> But, threadTimeOut must also do the EndTimeOut() processing. When the
> >> timeout end signal arrives, if threadDisplay is into Linux Domain, the
> >> system crashes.
> >
> > Do you have the same crash if you use vanilla Linux timer services
> > (__real_timer_create, __real_timer_settime, etc...).
> >
> > --
> > Gilles
>
> Hello,
>
> I try with vanilla linux timer. If threadTimeOut sets up one or two
> timeouts, now, it's ok. But if it sets up more than two timeouts, the
> system crashes.
> I ve got the same error kernel traces as Posix timer use.
>
> (By the way, In which file vanilla timer services are written ?
> __real_timer_create ... are declared in time.h in xenomai files. I look
> for in linux and glibc sources but I don t find them.)
>
> I send you a test program in which severals timeouts can be created.
Ok. Got it now. The error you have is fixed in the v2.4.x branch. So,
here is a patch that you can apply to the v2.4.3 release.
--
Gilles.
[-- Attachment #2: xeno-fix-rpi.diff --]
[-- Type: text/plain, Size: 562 bytes --]
Index: ksrc/nucleus/shadow.c
===================================================================
--- ksrc/nucleus/shadow.c (revision 3704)
+++ ksrc/nucleus/shadow.c (working copy)
@@ -276,9 +276,11 @@ static void rpi_update(xnthread_t *threa
xnlock_get_irqsave(&rpislot->lock, s);
- sched_removepq(&rpislot->threadq, &thread->xlink);
- rpi_none(thread);
- rpi_push(thread, cpu);
+ if (rpi_p(thread)) {
+ sched_removepq(&rpislot->threadq, &thread->xlink);
+ rpi_none(thread);
+ rpi_push(thread, cpu);
+ }
xnlock_put_irqrestore(&rpislot->lock, s);
}
next prev parent reply other threads:[~2008-05-30 22:05 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-19 12:14 [Xenomai-help] Problem with time-out ends Fabien MAHOT
2008-05-19 12:32 ` Gilles Chanteperdrix
2008-05-19 12:57 ` Gilles Chanteperdrix
2008-05-19 15:48 ` Fabien MAHOT
2008-05-19 15:57 ` Gilles Chanteperdrix
2008-05-19 19:47 ` [Xenomai-help] Patching order George Pitich
2008-05-19 19:56 ` Gilles Chanteperdrix
2008-05-20 14:30 ` [Xenomai-help] Problem with time-out ends Fabien MAHOT
2008-05-20 15:23 ` Gilles Chanteperdrix
2008-05-20 17:42 ` Anders Blomdell
2008-05-20 19:34 ` Gilles Chanteperdrix
2008-05-20 19:38 ` Gilles Chanteperdrix
2008-05-21 14:24 ` Fabien MAHOT
2008-05-21 14:33 ` Gilles Chanteperdrix
2008-05-21 16:18 ` Fabien MAHOT
2008-05-21 18:44 ` Gilles Chanteperdrix
2008-05-22 14:51 ` Fabien MAHOT
2008-05-22 15:09 ` Gilles Chanteperdrix
2008-05-22 15:19 ` Gilles Chanteperdrix
2008-05-23 13:31 ` Fabien MAHOT
2008-05-23 13:55 ` Gilles Chanteperdrix
2008-05-26 8:14 ` Fabien MAHOT
2008-05-26 11:55 ` Gilles Chanteperdrix
2008-05-27 2:30 ` Gilles Chanteperdrix
2008-05-28 16:29 ` Fabien MAHOT
2008-05-28 16:31 ` Gilles Chanteperdrix
2008-05-29 6:36 ` Fabien MAHOT
2008-05-29 11:26 ` Fabien MAHOT
2008-05-29 13:14 ` Gilles Chanteperdrix
2008-05-30 13:20 ` Fabien MAHOT
2008-05-30 14:08 ` Gilles Chanteperdrix
2008-05-30 22:05 ` Gilles Chanteperdrix [this message]
2008-06-03 9:02 ` Fabien MAHOT
2008-06-03 9:12 ` Gilles Chanteperdrix
2008-06-03 12:10 ` Gilles Chanteperdrix
2008-06-03 12:48 ` Fabien MAHOT
2008-06-03 12:53 ` Gilles Chanteperdrix
2008-06-03 13:04 ` Fabien MAHOT
2008-06-04 9:38 ` Fabien MAHOT
2008-06-13 14:36 ` Fabien MAHOT
2008-06-13 15:03 ` Gilles Chanteperdrix
2008-06-13 15:43 ` Gilles Chanteperdrix
2008-06-16 6:40 ` Fabien MAHOT
2008-06-16 9:33 ` Gilles Chanteperdrix
2008-06-16 12:04 ` Fabien MAHOT
[not found] ` <7379.62.39.72.60.1213803323.squirrel@domain.hid>
2008-06-29 15:29 ` Gilles Chanteperdrix
2008-06-30 14:30 ` Gilles Chanteperdrix
2008-06-22 14:44 ` Gilles Chanteperdrix
2008-06-23 7:23 ` Fabien MAHOT
2008-06-23 9:33 ` Gilles Chanteperdrix
2008-06-23 10:04 ` Fabien MAHOT
2008-05-26 23:48 ` Gilles Chanteperdrix
2008-05-27 1:04 ` Gilles Chanteperdrix
[not found] <C1C62166118DFA4A8BBA01A2411F0D170BF3D1BE92@domain.hid>
2008-07-25 17:02 ` Gilles Chanteperdrix
[not found] ` <C1C62166118DFA4A8BBA01A2411F0D170BF3DB1DB6@domain.hid>
2008-08-19 14:23 ` Gilles Chanteperdrix
[not found] ` <48ABDA75.70901@domain.hid>
[not found] ` <C1C62166118DFA4A8BBA01A2411F0D170E9BD4FF66@domain.hid>
2008-08-20 14:01 ` Gilles Chanteperdrix
2008-08-20 16:45 ` Gilles Chanteperdrix
[not found] ` <C1C62166118DFA4A8BBA01A2411F0D170E9BD4FFDD@PRI-MBX-101.dom1.vinci-energies.net>
2008-08-21 12:34 ` Gilles Chanteperdrix
2008-08-21 12:45 ` Gilles Chanteperdrix
[not found] ` <C1C62166118DFA4A8BBA01A2411F0D170E9BD5002E@PRI-MBX-101.dom1.vinci-energies.net>
2008-08-21 17:29 ` Gilles Chanteperdrix
[not found] ` <C1C62166118DFA4A8BBA01A2411F0D170E9BD50078@domain.hid>
2008-08-22 12:07 ` 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=18496.31292.674733.417262@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=fabien.mahot@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.