All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Philip Ha <philwman@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] clock problem
Date: Wed, 27 Jul 2011 20:47:58 +0200	[thread overview]
Message-ID: <4E305D5E.8070908@domain.hid> (raw)
In-Reply-To: <1311085450.21897.YahooMailClassic@domain.hid>

On 07/19/2011 04:24 PM, Philip Ha wrote:
> Dear all,
> 
> I am running a serial port test in xenomai (xenomai-2.5.5.2) using 16550A driver.
> In my program, I am calling
> 
> rt_dev_ioctl(dev_id, RTSER_RTIOC_WAIT_EVENT, & rx_event);
> 
> when an event happens, I use clock_gettime(CLOCK_MONOTONIC, & curr_time)
> to get the current time. The program runs continuosly in a while loop. In this way, I 
> measure the elapsed time between the previous and current events.

Hi,

we do not have enough details here, if you are compiling for the native
skin, the call to clock_gettime is linux clock_gettime, so, can not
really be relied upon in a thread which you with to remain in primary
mode. You should use rt_timer_read.

If you are compiling for the posix skin, you do not give us enough
information to even begin understanding the issue you have .

Regards.

-- 
                                                                Gilles.


  reply	other threads:[~2011-07-27 18:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 14:24 [Xenomai-help] clock problem Philip Ha
2011-07-27 18:47 ` Gilles Chanteperdrix [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-07-20 18:35 Philip Ha
     [not found] <1311805213.7716.YahooMailClassic@domain.hid>
2011-07-28 14:35 ` Gilles Chanteperdrix
     [not found] <1311873701.2537.YahooMailClassic@domain.hid>
2011-07-31 17:19 ` Gilles Chanteperdrix
2011-08-04 15:55 Philip Ha
2011-08-04 16:39 ` Gilles Chanteperdrix
2011-08-04 17:26   ` Philip Ha
2011-08-04 17:34     ` Gilles Chanteperdrix
2011-08-04 19:27 Philip Ha
2011-08-05 12:53 ` Gilles Chanteperdrix
2011-08-08 16:44   ` Philip Ha
2011-08-08 18:00     ` Gilles Chanteperdrix
2011-08-10 15:18 Philip Ha
2011-08-10 15:49 ` Gilles Chanteperdrix
2011-08-11 21:18 Philip Ha
2011-08-11 22:24 ` Gilles Chanteperdrix
2011-08-15 13:50 Philip Ha

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=4E305D5E.8070908@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=philwman@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.