From: Steven Seeger <steve@domain.hid>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] resume/suspend periodic timing issue
Date: Tue, 28 Feb 2006 08:27:32 -0800 [thread overview]
Message-ID: <C029B9F4.258E%steve@domain.hid> (raw)
In-Reply-To: <440473CA.6000205@domain.hid>
Actually the player would never miss a job, because the call to resume was
only made if the task is suspended. As with any /dev/dsp device, data in the
buffer has to be a certain size before it starts playing, so every call to
the driver's write command would check the state of the task and resume it
if necessary. :) It's crude but it works. I wrote that driver when I was
very inexperienced with RTOSs and was just using it as an example. I think
that code is over 4 years old.
Steven
On 2/28/06 8:01 AM, "Jan Kiszka" <jan.kiszka@domain.hid> wrote:
> Steven Seeger wrote:
>> Well, the thread suspends when it's done playing, and when new data arrives
>> in the buffer via /dev/dsp, the thread is then resumed. I just wonder what
>> the point of suspend/resume is, then, if we're supposed to just use
>> rt_task_set_periodic to create a new timeline. Right now I am doing this,
>> and then suspending, and then before I resume, I make another timeline.
>>
>
> Well, and this is racy in case the resume - for what reason ever - takes
> place before the suspend. It will get lost then, and your player will
> miss a job. One should better model this via an event (don't count
> multiple wakeups) or a semaphore (each wakeup counts and is paired with
> a wait in the player task).
>
> Jan
>
next prev parent reply other threads:[~2006-02-28 16:27 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-27 14:20 [Xenomai-help] resume/suspend periodic timing issue Steven Seeger
2006-02-27 18:39 ` Gilles Chanteperdrix
2006-02-28 13:45 ` Steven Seeger
2006-02-28 13:55 ` Gilles Chanteperdrix
2006-02-28 14:07 ` Steven Seeger
2006-02-28 14:21 ` Jan Kiszka
2006-02-28 14:24 ` Steven Seeger
2006-02-28 15:10 ` Philippe Gerum
2006-02-28 15:13 ` Steven Seeger
2006-02-28 15:27 ` Jan Kiszka
2006-02-28 15:29 ` Steven Seeger
2006-02-28 15:43 ` Jan Kiszka
2006-02-28 15:46 ` Steven Seeger
2006-02-28 16:01 ` Jan Kiszka
2006-02-28 16:27 ` Steven Seeger [this message]
2006-02-28 15:29 ` Philippe Gerum
2006-02-28 15:31 ` Steven Seeger
2006-02-28 16:20 ` Philippe Gerum
2006-02-28 16:28 ` Steven Seeger
2006-02-28 16:37 ` Philippe Gerum
2006-02-28 17:24 ` Steven Seeger
2006-02-28 17:53 ` [Xenomai-core] rt_task_wait_period() and overruns Philippe Gerum
2006-02-28 18:02 ` [Xenomai-core] Re: [Xenomai-help] " Philippe Gerum
2006-02-28 18:15 ` Steven Seeger
2006-03-01 10:22 ` Philippe Gerum
2006-03-01 15:25 ` Dmitry Adamushko
2006-03-01 16:00 ` Philippe Gerum
2006-03-01 19:01 ` Dmitry Adamushko
2006-03-03 11:29 ` Philippe Gerum
2006-02-28 13:57 ` [Xenomai-help] resume/suspend periodic timing issue Philippe Gerum
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=C029B9F4.258E%steve@domain.hid \
--to=steve@domain.hid \
--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.