/usr/share/doc/libcomedi-dev/html/func-ref-comedi-mark-buffer-written.html is in libcomedi-dev 0.10.1-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>comedi_mark_buffer_written</title><link rel="stylesheet" type="text/css" href="comedilib.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Comedi"><link rel="up" href="functionreference.html#idp74615328" title="5.4.2. Asynchronous commands"><link rel="prev" href="func-ref-comedi-mark-buffer-read.html" title="comedi_mark_buffer_read"><link rel="next" href="func-ref-comedi-poll.html" title="comedi_poll"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">comedi_mark_buffer_written</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="func-ref-comedi-mark-buffer-read.html">Prev</a> </td><th width="60%" align="center">5.4.2. Asynchronous commands</th><td width="20%" align="right"> <a accesskey="n" href="func-ref-comedi-poll.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="func-ref-comedi-mark-buffer-written"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>comedi_mark_buffer_written — streaming buffer control</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include <comedilib.h></pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">comedi_mark_buffer_written</b>(</code></td><td>comedi_t * <var class="pdparam">device</var>, </td></tr><tr><td> </td><td>unsigned int <var class="pdparam">subdevice</var>, </td></tr><tr><td> </td><td>unsigned int <var class="pdparam">num_bytes</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp74416640"></a><h2>
Description
</h2><p>
The function <code class="function">comedi_mark_buffer_written</code> is used on a subdevice
that has a Comedi output command in progress. It should only be used
if you are using a <code class="function">mmap</code> mapping to write data to Comedi's buffer
(as opposed to calling <code class="function">write</code> on the device
file), since Comedi
will automatically keep track of how many bytes have been
transferred via <code class="function">write</code> calls. This function is
used to indicate that the next <em class="parameter"><code>num_bytes</code></em>
bytes in the buffer
are valid and may be sent to the device.
</p></div><div class="refsect1"><a name="idp74410064"></a><h2>
Return value
</h2><p>
The function <code class="function">comedi_mark_buffer_written</code> returns
number of bytes successfully marked as written,
or <code class="literal">-1</code> on error. The return value may be less than
<em class="parameter"><code>num_bytes</code></em> if you attempt to mark more
bytes written than the amount of free space currently available
in the output buffer, or
if <em class="parameter"><code>num_bytes</code></em> must be
rounded down to be an exact multiple of the subdevice's
sample size (either <code class="code">sizeof(sampl_t)</code>
or <code class="code">sizeof(lsampl_t)</code>).
</p><p>
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="func-ref-comedi-mark-buffer-read.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="functionreference.html#idp74615328">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="func-ref-comedi-poll.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">comedi_mark_buffer_read </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> comedi_poll</td></tr></table></div></body></html>
|