From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Steve Deiters <SteveDeiters@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] pthread_make_periodic_np initial start date
Date: Tue, 02 Feb 2010 23:35:54 +0100 [thread overview]
Message-ID: <4B68A8CA.1090607@domain.hid> (raw)
In-Reply-To: <181804936ABC2349BE503168465576460D8F07F0@domain.hid>
Steve Deiters wrote:
> Is there a way to specify no initial delay when calling
> pthread_make_periodic_np? If I pass a value directly obtained from
> clock_gettime, it will return a ETIMEDOUT error due to time passing
> before I make the call. I could add a small delay to the value obtained
> from clock_gettime, but I would be concerned that due to other
> happenings in the system, the absolute date may still have passed by the
> time it gets around to calling pthread_make_periodic_np.
>
> What I would be looking for I guess is what happens when I call
> rt_task_set_periodic with an idate parameter of TM_NOW. Is there any
> way to simulate this behavior?
pthread_make_periodic_np is a legacy from RTLinux. You should be using
clock_nanosleep instead.
That said, pthread_make_periodic_np internally uses the same service as
rt_task_set_periodic, and TM_NOW is just 0. So, you can probably pass a
timespec with tv_sec and tv_nsec both 0.
--
Gilles.
prev parent reply other threads:[~2010-02-02 22:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-02 22:29 [Xenomai-help] pthread_make_periodic_np initial start date Steve Deiters
2010-02-02 22:35 ` Gilles Chanteperdrix [this message]
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=4B68A8CA.1090607@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=SteveDeiters@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.