comedi_mark_buffer_read

Langue: en

Version: 28 October 2007 (fedora - 05/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

comedi_mark_buffer_read - streaming buffer control

SYNOPSIS

#include <comedilib.h>

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

DESCRIPTION

The function comedi_mark_buffer_read() is used on a subdevice that has a Comedi input command in progress. It should only be used if you are using a mmap() (as opposed to calling read() on the device file) to read data from Comedi's buffer, since Comedi will automatically keep track of how many bytes have been transferred via read() calls. This function is used to indicate that the next num_bytes bytes in the buffer are no longer needed and may be discarded. If there is an error, -1 is returned.