blob: e2c4190f9bb609a623a7f11994c138b66aee3ffc [file] [log] [blame]
<refentry id="func-munmap">
<refentrytitle>V4L2 munmap()</refentrytitle>
<refpurpose>Unmap device memory</refpurpose>
#include &lt;unistd.h&gt;
#include &lt;sys/mman.h&gt;</funcsynopsisinfo>
<funcdef>int <function>munmap</function></funcdef>
<paramdef>void *<parameter>start</parameter></paramdef>
<paramdef>size_t <parameter>length</parameter></paramdef>
<para>Address of the mapped buffer as returned by the
&func-mmap; function.</para>
<para>Length of the mapped buffer. This must be the same
value as given to <function>mmap()</function> and returned by the
driver in the &v4l2-buffer; <structfield>length</structfield>
field for the single-planar API and in the &v4l2-plane;
<structfield>length</structfield> field for the multi-planar API.</para>
<para>Unmaps a previously with the &func-mmap; function mapped
buffer and frees it, if possible. <!-- ? This function (not freeing)
has no impact on I/O in progress, specifically it does not imply
&VIDIOC-STREAMOFF; to terminate I/O. Unmapped buffers can still be
enqueued, dequeued or queried, they are just not accessible by the
<title>Return Value</title>
<para>On success <function>munmap()</function> returns 0, on
failure -1 and the <varname>errno</varname> variable is set
<para>The <parameter>start</parameter> or
<parameter>length</parameter> is incorrect, or no buffers have been
mapped yet.</para>
Local Variables:
mode: sgml
sgml-parent-document: "v4l2.sgml"
indent-tabs-mode: nil