1COMEDI_MARK_BUFFER_R(3)        Comedi reference        COMEDI_MARK_BUFFER_R(3)
2
3
4

NAME

6       comedi_mark_buffer_read - streaming buffer control
7

SYNOPSIS

9       #include <comedilib.h>
10
11       int comedi_mark_buffer_read(comedi_t * device, unsigned int subdevice,
12                                   unsigned int num_bytes);
13

DESCRIPTION

15       The function comedi_mark_buffer_read is used on a subdevice that has a
16       Comedi input command in progress. It should only be used if you are
17       using a mmap mapping to read data from Comedi's buffer (as opposed to
18       calling read on the device file descriptor), since Comedi will
19       automatically keep track of how many bytes have been transferred via
20       read calls. This function is used to indicate that the next num_bytes
21       bytes in the buffer are no longer needed and may be discarded.
22

RETURN VALUE

24       On success, comedi_mark_buffer_read returns the number of bytes
25       successfully marked as read. The return value may be less than the
26       num_bytes. On failure, -1 is returned.
27

AUTHORS

29       David Schleef <ds@schleef.org>
30           Author.
31
32       Frank Mori Hess <fmhess@users.sourceforge.net>
33           Author.
34
35       Herman Bruyninckx <Herman.Bruyninckx@mech.kuleuven.ac.be>
36           Author.
37
38       Bernd Porr <tech@linux-usb-daq.co.uk>
39           Author.
40
41       Ian Abbott <abbotti@mev.co.uk>
42           Author.
43
44       Éric Piel <piel@delmic.com>
45           Author.
46
48       Copyright © 1998-2003 David Schleef
49       Copyright © 2001-2003, 2005, 2008 Frank Mori Hess
50       Copyright © 2002-2003 Herman Bruyninckx
51       Copyright © 2012 Bernd Porr
52       Copyright © 2012 Ian Abbott
53       Copyright © 2012, 2015 Éric Piel
54
55       This document is part of Comedilib. In the context of this document,
56       the term "source code" as defined by the license is interpreted as the
57       XML source.
58
59       This library is free software; you can redistribute it and/or modify it
60       under the terms of the GNU Lesser General Public License as published
61       by the Free Software Foundation, version 2.1 of the License.
62
63       This library is distributed in the hope that it will be useful, but
64       WITHOUT ANY WARRANTY; without even the implied warranty of
65       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
66       General Public License for more details.
67
68       You should have received a copy of the GNU Lesser General Public
69       License along with this library; if not, write to the Free Software
70       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
71       USA.
72
73
74
75
76Comedi                            05/11/2017           COMEDI_MARK_BUFFER_R(3)
Impressum