All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "Herrera-Bendezu, Luis" <lherrera@domain.hid>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] system locks when calling Linux clock_gettime
Date: Tue, 13 Mar 2012 19:22:47 +0100	[thread overview]
Message-ID: <4F5F9077.8000700@domain.hid> (raw)
In-Reply-To: <584FFDF8F96BB74593285A7D65886EC008B91F25@domain.hid>

On 03/13/2012 07:06 PM, Herrera-Bendezu, Luis wrote:
> Hello,
> 
> Xenomai version 2.4.10, Linux version 2.6.30.3, CPU PPC.
> 
> I am trying to work around an issue where the Linux and Xenomai realtime clocks
> drifts when Linux clock is updated by NTP. It was suggested in the mail exchange:
> http://www.mail-archive.com/xenomai@xenomai.org
> 
> to use clock_gettime()/clock_settime() to keep both clocks in sync.
> 
> However, calling linux clock_gettime() from a Xenomai  thread is causing system to
> freeze after a few minutes as shown in the following test program where the interval
> to re-sync clocks is small, 50 msec, to force error faster:

Yes, this is a known issue too. You can only call __real_clock_gettime
when in secondary mode. So, preferably from a thread created with
__real_pthread_create.

Any chance of updating xenomai? Xenomai 2.6 allows accessing a clock
synchronized with Linux clock from xenomai threads, without even
emitting a system call depending on the architecture.

-- 
                                                                Gilles.


  reply	other threads:[~2012-03-13 18:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 18:06 [Xenomai-help] system locks when calling Linux clock_gettime Herrera-Bendezu, Luis
2012-03-13 18:22 ` Gilles Chanteperdrix [this message]
2012-03-13 18:35   ` Herrera-Bendezu, Luis

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=4F5F9077.8000700@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=lherrera@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.