From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jozsef Lazar <jlazar@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Waiting w/o burning CPU
Date: Wed, 09 Dec 2009 14:41:21 +0100 [thread overview]
Message-ID: <4B1FA901.7070903@domain.hid> (raw)
In-Reply-To: <4B1F9E26.7070900@domain.hid>
Jozsef Lazar wrote:
> Hi,
>
> Could anyone tell me which Xenomai function should I use to wait (even
> up to 100msecs) without burning CPU. I tried using nanosleep() but it
> was always returning with 1 (one) and analyzing my output pins with an
> oscilloscope I couldn't see any time delays. Now I use rt_timer_spin()
> but I'm not sure whether I'm doing any wrong to my rt threads (or anyone
> else in the kernel). My environment: a kernel driver with lots of rt
> threads controlling stepper motors. The function where I want to wait is
> a work_struct task (called by a schedule_work). Thanks.
A work_struct task is a Linux task, not a xenomai thread. Xenomai
functions work for Xenomai thread. The behaviour of nanosleep is
documented here:
http://www.xenomai.org/documentation/xenomai-2.4/html/api/group__posix__time.html#ga9ce6a1ed91a601dee133c8b6cf8b721a
1 is EPERM.
--
Gilles
next prev parent reply other threads:[~2009-12-09 13:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 12:55 [Xenomai-help] Waiting w/o burning CPU Jozsef Lazar
2009-12-09 13:41 ` Gilles Chanteperdrix [this message]
[not found] ` <4B1FACFB.2010809@domain.hid>
2009-12-09 14: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=4B1FA901.7070903@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jlazar@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.