From: Jan Kiszka <jan.kiszka@domain.hid>
To: Rodrigo Rosenfeld Rosas <lbocseg@domain.hid>
Cc: xenomai@xenomai.org
Subject: [Xenomai-help] Re: RTDM and udelay
Date: Wed, 25 Jan 2006 20:56:19 +0100 [thread overview]
Message-ID: <43D7D7E3.3040804@domain.hid> (raw)
In-Reply-To: <200601251552.10271.lbocseg@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 769 bytes --]
Rodrigo Rosenfeld Rosas wrote:
> Is there any alternative to udelay on RTDM?
>
> Or should I do something like:
>
> void rt_udelay(unsigned int usec) {
> uint64_t timeout = rtdm_clock_read () + usec;
> while (rtdm_clock_read () < timeout);
> }
You mean something like this: =:)
http://www.rts.uni-hannover.de/xenomai/lxr/source/ksrc/skins/rtdm/drvlib.c?v=SVN-trunk#L366
>
> Or maybe my design is wrong.
>
> I have a function, say WriteI2C(...). Should I create it as a task and call
> rtdm_task_sleep?
Depending on how long you would like to sleep and if you are not inside
an IRQ handler, a re-scheduling call like rtdm_task_sleep() can be
better. If it's just about a few microseconds, busy sleeping should be
preferred.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
next prev parent reply other threads:[~2006-01-25 19:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-25 17:52 [Xenomai-help] RTDM and udelay Rodrigo Rosenfeld Rosas
2006-01-25 19:56 ` Jan Kiszka [this message]
2006-01-26 0:42 ` [Xenomai-help] " Rodrigo Rosenfeld Rosas
2006-01-26 8:32 ` Jan Kiszka
2006-01-26 10:49 ` Rodrigo Rosenfeld Rosas
2006-01-26 15:17 ` Jan Kiszka
2006-01-27 9:41 ` Rodrigo Rosenfeld Rosas
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=43D7D7E3.3040804@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=lbocseg@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.