Re: buffer allocation also for configuration instructions?

On Wed, Apr 30, 2003 at 10:59:02PM +0200, Herman Bruyninckx wrote:
> The implementation of do_insn_ioctl() in comedi_fops.c suggests that a
> buffer of MAX_SAMPLES samples is allocated for _all_ instructions,
> even if these instructions have no acquisition data (e.g.,
> configuration or INSN_INTTRIG instructions).

That is correct.  It may not appear to be efficient, but allocating
a buffer is quite fast.  (It's only 512 bytes.)

> The implementation of parse_insn() in comedi_fops.c places the
> INSN_INTTRIG instruction with the "non-subdevice instructions" (at
> least in the comment of the code), although the processing of this
> instructions does involve quite some subdevice data. One of the
> results is that the INSN_INTTRIG instruction is not tested on locking,
> being busy, and having a well-fromed channel spec. Is this a problem?

No.  This is up to the driver.  Specifically, drivers need to
know when an internal trigger makes sense.  The grouping is
actually by whether the instruction requires that the subdevice
is non-busy.



dave...

Received on 2003-04-30Z21:33:03