Re: simultaneous map of DMA read and write buffers

On Mon, 10.05.04, Alex Fielding <afielding_at_adelphia.net> wrote:

> TxMap= mmap(NULL, TxBufSize, PROT_READ, MAP_SHARED, comedi_fileno(dev), 0);

Try

TxMap= mmap(NULL, TxBufSize, PROT_WRITE, MAP_SHARED, comedi_fileno(dev), 0);

instead.

The PROT_WRITE flag translates to VM_WRITE in the kernel. In
static int comedi_mmap_v22() you find

if(vma->vm_flags & VM_WRITE){
      async=dev->write_subdev->async;
}else{
      async=dev->read_subdev->async;
}

good luck,
Nils

Received on 2004-05-10Z08:08:21