All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Nicolodi <daniele@domain.hid>
To: Alexis Berlemont <alexis.berlemont@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] How to avoid a tight real time loop
Date: Wed, 16 Jun 2010 18:49:22 +0200	[thread overview]
Message-ID: <4C190092.2040708@domain.hid> (raw)
In-Reply-To: <20100615221116.GB3087@domain.hid>

On 16/06/10 00:11, Alexis Berlemont wrote:
>> There is not an analogy API that can be used to require a certain amount
>> of data to the ADC driver. How can I code this loop to let other
>> processes to run?
> 
> As a matter of fact, there is something in the API which could have
> helped you in an unmapped configuration. If you set the flag
> A4L_CMD_BULK in the field "flags" of the command structure, a call to
> a4l_async_read() only returns when the data size specified as argument
> is available.

Unfortunately copying memory data around would decrease too much the
performance of my data acquisition code. By the way, I think that using
the O_NONBLOCK fcntl flag on the device descriptor file descriptor would
be the best way to activate this feature.

> Unfortunately, I have not done the same thing with a4l_poll, I might
> have added the requested size as an additional argument to a4l_poll. 
> 
> Any idea on how to extend the API without breaking it ?

I do not see any way rather than augmenting the function signature with
an additional parameter. If you want to maintain API compatibility the
only thing to do is to add a different function.

Cheers,
-- 
Daniele


  reply	other threads:[~2010-06-16 16:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15 12:30 [Xenomai-help] How to avoid a tight real time loop Daniele Nicolodi
2010-06-15 12:46 ` Gilles Chanteperdrix
2010-06-15 22:11 ` Alexis Berlemont
2010-06-16 16:49   ` Daniele Nicolodi [this message]
2010-06-16 18:19   ` Gilles Chanteperdrix
2010-06-24 22:50     ` Alexis Berlemont

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=4C190092.2040708@domain.hid \
    --to=daniele@domain.hid \
    --cc=alexis.berlemont@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.