comedi_mark_buffer_written(3)

comedi_mark_buffer_written3

Streaming buffer control

Usage

#include <comedilib.h>

int comedi_mark_buffer_written(comedi_t * device, unsigned int subdevice, unsigned int num_bytes);

Overview

The function comedi_mark_buffer_written is used on a subdevice that has a Comedi output command in progress. It should only be used if you are using a mmap mapping to write data to Comedi's buffer (as opposed to calling write on the device file descriptor), since Comedi will automatically keep track of how many bytes have been transferred via write calls. This function is used to indicate that the next num_bytes bytes in the buffer are valid and may be sent to the device.

Return value

On success, comedi_mark_buffer_written returns the number of bytes successfully marked as written. The return value may be less than the num_bytes. On failure, -1 is returned.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 7 times.

  1. 5.0–6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

Authors

David Schleef <[email protected]>

Author.

Frank Mori Hess <[email protected]>

Author.

Herman Bruyninckx <[email protected]>

Author.

Bernd Porr <[email protected]>

Author.

Ian Abbott <[email protected]>

Author.

Éric Piel <[email protected]>

Author.

From libcomedi-dev 0.11.0+5-1.3+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.