COMEDI_MARK_BUFFER_W(3)
β¨ NAME β¨
comedi_mark_buffer_written β streaming buffer control, bestie π
okay so this is a Comedi reference page, manual section 3, and we're talking about COMEDI_MARK_BUFFER_W(3). yes the whole name is shouting, she's dramatic, we love her π
πΈ SYNOPSIS πΈ
#include <comedilib.h>
int comedi_mark_buffer_written(comedi_t * device,
unsigned int subdevice,
unsigned int num_bytes);
π DESCRIPTION π
so comedi_mark_buffer_written is the function you call on a subdevice that has a Comedi output command in progress. it's giving "hey bestie, I got more data for you" energy π«Ά
real talk tho β you should only reach for this one if you're using anmmapmapping to write data into Comedi's buffer. if you're just callingwriteon the device file descriptor instead, don't bother, because Comedi already keeps track of how many bytes have been transferred viawritecalls all by itself. she's self-sufficient like that β¨
what this function actually does is tell Comedi: "the next num_bytes bytes sitting in the buffer are valid, go ahead and send them to the device." that's it, that's the whole vibe π
π₯ RETURN VALUE π₯
- on success β¨ β it returns the number of bytes successfully marked as written. and listen, that return value may be less than
num_bytes, so like, don't just assume they're equal, check your numbers bestie π - on failure π β
-1is returned. rude but honest.
π AUTHORS π
the icons who made this happen, periodt π
- David Schleef
<ds@schleef.org>- Author.
- Frank Mori Hess
<fmhess@users.sourceforge.net>- Author.
- Herman Bruyninckx
<Herman.Bruyninckx@mech.kuleuven.ac.be>- Author.
- Bernd Porr
<tech@linux-usb-daq.co.uk>- Author.
- Ian Abbott
<abbotti@mev.co.uk>- Author.
- Γric Piel
<piel@delmic.com>- Author.
π COPYRIGHT π
Copyright Β© 1998-2003 David Schleef
Copyright Β© 2001-2003, 2005, 2008 Frank Mori Hess
Copyright Β© 2002-2003 Herman Bruyninckx
Copyright Β© 2012 Bernd Porr
Copyright Β© 2012 Ian Abbott
Copyright Β© 2012, 2015 Γric Piel
This document is part of Comedilib. In the context of this document, the term "source code" as defined by the license is interpreted as the XML source.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 2.1 of the License.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
ngl the license paragraph is a whole mood but you DO have to read it, it's not decorative π
that's the page babes πΈ this was Comedi, dated 03/20/2026, filed under COMEDI_MARK_BUFFER_W(3) β go mark some bytes written, you absolute main character π¦π
π¦ where this page comes from
- ubuntu resolute: libcomedi-dev 0.11.0+5-1.3build6 Β· LGPL-2.1-only
- ubuntu stonking: libcomedi-dev 0.11.0+5-1.3build6 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms