public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: b.aubert@faiveley.com
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] cyg_timespec_to_ticks
Date: Wed, 18 Aug 2004 10:33:00 -0000	[thread overview]
Message-ID: <C1256EF4.00355304.00@smtp.faiveley.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 682 bytes --]



Hello,

I have a problem when using "nanosleep()". I want to sleep for 20 ms, so I call
nanosleep() with 20.000.000 ns. My system tick is 10 ms.
Result is : the thread is sent to sleep during 30 ms...
I tried to trace the problem, adding traces (diag_printf) in function
cyg_timespec_to_ticks() (/compat/posix/<version>/time.cxx), to output the result
 (number of ticks) to the console.

When called with 20.000.000 ns, this function returns 3 ticks, which is wrong.

When traces are added to this function, in "if (roundup)..." the result is ok :
2 ticks.

I can't figure the origin of this problem. bug compiler ? mismanagement of cache
 ?

thanks for helping.

Bruno Aubert.



[-- Attachment #2: Faiveley_Disclaimer.txt --]
[-- Type: text/plain, Size: 747 bytes --]

NOTE : Ce courrier électronique est destiné exclusivement au(x) destinataire(s) mentionné(s) ci-dessus et peut contenir des informations privilégiées, confidentielles et/ou non soumises à divulgation aux termes des lois applicables.  Si vous avez reçu ce message par erreur, ou s'il ne vous est pas destiné, veuillez le signaler immédiatement à l'expéditeur et effacer ce courrier électronique.

NOTE: This e-mail message is intended only for the named recipient(s) above and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law.  If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message.


[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

                 reply	other threads:[~2004-08-18 10:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=C1256EF4.00355304.00@smtp.faiveley.fr \
    --to=b.aubert@faiveley.com \
    --cc=ecos-discuss@sources.redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).