1 <refentry id="func-munmap">
3 <refentrytitle>V4L2 munmap()</refentrytitle>
8 <refname>v4l2-munmap</refname>
9 <refpurpose>Unmap device memory</refpurpose>
15 #include <unistd.h>
16 #include <sys/mman.h></funcsynopsisinfo>
18 <funcdef>int <function>munmap</function></funcdef>
19 <paramdef>void *<parameter>start</parameter></paramdef>
20 <paramdef>size_t <parameter>length</parameter></paramdef>
25 <title>Arguments</title>
28 <term><parameter>start</parameter></term>
30 <para>Address of the mapped buffer as returned by the
31 &func-mmap; function.</para>
35 <term><parameter>length</parameter></term>
37 <para>Length of the mapped buffer. This must be the same
38 value as given to <function>mmap()</function> and returned by the
39 driver in the &v4l2-buffer; <structfield>length</structfield>
47 <title>Description</title>
49 <para>Unmaps a previously with the &func-mmap; function mapped
50 buffer and frees it, if possible. <!-- ? This function (not freeing)
51 has no impact on I/O in progress, specifically it does not imply
52 &VIDIOC-STREAMOFF; to terminate I/O. Unmapped buffers can still be
53 enqueued, dequeued or queried, they are just not accessible by the
54 application.--></para>
58 <title>Return Value</title>
60 <para>On success <function>munmap()</function> returns 0, on
61 failure -1 and the <varname>errno</varname> variable is set
66 <term><errorcode>EINVAL</errorcode></term>
68 <para>The <parameter>start</parameter> or
69 <parameter>length</parameter> is incorrect, or no buffers have been
80 sgml-parent-document: "v4l2.sgml"