All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giulio Moro <g.moro@qmul.ac.uk>
To: "eladyaakovi@campus.technion.ac.il"
	<eladyaakovi@campus.technion.ac.il>,
	"xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Toggling GPIO RT Xenomai on Dragonboard 41c
Date: Thu, 22 Jun 2017 12:30:03 +0000	[thread overview]
Message-ID: <DB6PR0701MB2456F0240792DE24F631E5DFB5DB0@DB6PR0701MB2456.eurprd07.prod.outlook.com> (raw)
In-Reply-To: <VI1PR0101MB20008C1321074C271F56BBA2B8DB0@VI1PR0101MB2000.eurprd01.prod.exchangelabs.com>

> Can you explain please why this is not writing to a file:

Is this related to "Re: Toggling GPIO RT Xenomai on Dragonboard 41c" or should it go under a separate heading?

> (without the rt_task_sleep(1000) and the while it works fine).

Many things could be wrong with this. 
If `time_to_run` is very small (or zero), then the condition is never met. On the other hand , I have no idea what time(NULL) does. Why don't you add a `printf()` inside the loop to see if it gets called once at least? 
Also, I have no idea why you would try to write one byte to disk every 1 microsecond and how / whether your system would be capable of dealing with it.

Are you using some Xenomai wrappers or is `fprintf` actually calling the stdlib `fprintf` ? In the latter case, then I see this code as potentially hanging your system if it actually were to run and `time_to_run` is not small enough.

Just guessing, because we do not see a larger portion of your code.


  reply	other threads:[~2017-06-22 12:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21  8:10 [Xenomai] Toggling GPIO RT Xenomai on Dragonboard 41c eladyaakovi
2017-06-21 12:35 ` Giulio Moro
2017-06-22 11:45   ` eladyaakovi
2017-06-22 12:30     ` Giulio Moro [this message]
2017-06-22 15:05       ` eladyaakovi
2017-06-22 15:12         ` Giulio Moro
2017-06-22 15:21           ` eladyaakovi

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=DB6PR0701MB2456F0240792DE24F631E5DFB5DB0@DB6PR0701MB2456.eurprd07.prod.outlook.com \
    --to=g.moro@qmul.ac.uk \
    --cc=eladyaakovi@campus.technion.ac.il \
    --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.