diff options
Diffstat (limited to 'Documentation/DocBook/media/v4l/func-munmap.xml')
-rw-r--r-- | Documentation/DocBook/media/v4l/func-munmap.xml | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/Documentation/DocBook/media/v4l/func-munmap.xml b/Documentation/DocBook/media/v4l/func-munmap.xml new file mode 100644 index 000000000000..e2c4190f9bb6 --- /dev/null +++ b/Documentation/DocBook/media/v4l/func-munmap.xml | |||
@@ -0,0 +1,84 @@ | |||
1 | <refentry id="func-munmap"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>V4L2 munmap()</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | |||
7 | <refnamediv> | ||
8 | <refname>v4l2-munmap</refname> | ||
9 | <refpurpose>Unmap device memory</refpurpose> | ||
10 | </refnamediv> | ||
11 | |||
12 | <refsynopsisdiv> | ||
13 | <funcsynopsis> | ||
14 | <funcsynopsisinfo> | ||
15 | #include <unistd.h> | ||
16 | #include <sys/mman.h></funcsynopsisinfo> | ||
17 | <funcprototype> | ||
18 | <funcdef>int <function>munmap</function></funcdef> | ||
19 | <paramdef>void *<parameter>start</parameter></paramdef> | ||
20 | <paramdef>size_t <parameter>length</parameter></paramdef> | ||
21 | </funcprototype> | ||
22 | </funcsynopsis> | ||
23 | </refsynopsisdiv> | ||
24 | <refsect1> | ||
25 | <title>Arguments</title> | ||
26 | <variablelist> | ||
27 | <varlistentry> | ||
28 | <term><parameter>start</parameter></term> | ||
29 | <listitem> | ||
30 | <para>Address of the mapped buffer as returned by the | ||
31 | &func-mmap; function.</para> | ||
32 | </listitem> | ||
33 | </varlistentry> | ||
34 | <varlistentry> | ||
35 | <term><parameter>length</parameter></term> | ||
36 | <listitem> | ||
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> | ||
40 | field for the single-planar API and in the &v4l2-plane; | ||
41 | <structfield>length</structfield> field for the multi-planar API.</para> | ||
42 | </listitem> | ||
43 | </varlistentry> | ||
44 | </variablelist> | ||
45 | </refsect1> | ||
46 | |||
47 | <refsect1> | ||
48 | <title>Description</title> | ||
49 | |||
50 | <para>Unmaps a previously with the &func-mmap; function mapped | ||
51 | buffer and frees it, if possible. <!-- ? This function (not freeing) | ||
52 | has no impact on I/O in progress, specifically it does not imply | ||
53 | &VIDIOC-STREAMOFF; to terminate I/O. Unmapped buffers can still be | ||
54 | enqueued, dequeued or queried, they are just not accessible by the | ||
55 | application.--></para> | ||
56 | </refsect1> | ||
57 | |||
58 | <refsect1> | ||
59 | <title>Return Value</title> | ||
60 | |||
61 | <para>On success <function>munmap()</function> returns 0, on | ||
62 | failure -1 and the <varname>errno</varname> variable is set | ||
63 | appropriately:</para> | ||
64 | |||
65 | <variablelist> | ||
66 | <varlistentry> | ||
67 | <term><errorcode>EINVAL</errorcode></term> | ||
68 | <listitem> | ||
69 | <para>The <parameter>start</parameter> or | ||
70 | <parameter>length</parameter> is incorrect, or no buffers have been | ||
71 | mapped yet.</para> | ||
72 | </listitem> | ||
73 | </varlistentry> | ||
74 | </variablelist> | ||
75 | </refsect1> | ||
76 | </refentry> | ||
77 | |||
78 | <!-- | ||
79 | Local Variables: | ||
80 | mode: sgml | ||
81 | sgml-parent-document: "v4l2.sgml" | ||
82 | indent-tabs-mode: nil | ||
83 | End: | ||
84 | --> | ||