| 1 |
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later |
| 2 |
.. c:namespace:: DTV.dmx |
| 3 |
|
| 4 |
.. _dmx-munmap: |
| 5 |
|
| 6 |
************ |
| 7 |
DVB munmap() |
| 8 |
************ |
| 9 |
|
| 10 |
Name |
| 11 |
==== |
| 12 |
|
| 13 |
dmx-munmap - Unmap device memory |
| 14 |
|
| 15 |
.. warning:: This API is still experimental. |
| 16 |
|
| 17 |
Synopsis |
| 18 |
======== |
| 19 |
|
| 20 |
.. code-block:: c |
| 21 |
|
| 22 |
#include <unistd.h> |
| 23 |
#include <sys/mman.h> |
| 24 |
|
| 25 |
.. c:function:: int munmap( void *start, size_t length ) |
| 26 |
|
| 27 |
Arguments |
| 28 |
========= |
| 29 |
|
| 30 |
``start`` |
| 31 |
Address of the mapped buffer as returned by the |
| 32 |
:c:func:`mmap()` function. |
| 33 |
|
| 34 |
``length`` |
| 35 |
Length of the mapped buffer. This must be the same value as given to |
| 36 |
:c:func:`mmap()`. |
| 37 |
|
| 38 |
Description |
| 39 |
=========== |
| 40 |
|
| 41 |
Unmaps a previously with the :c:func:`mmap()` function mapped |
| 42 |
buffer and frees it, if possible. |
| 43 |
|
| 44 |
Return Value |
| 45 |
============ |
| 46 |
|
| 47 |
On success :c:func:`munmap()` returns 0, on failure -1 and the |
| 48 |
``errno`` variable is set appropriately: |
| 49 |
|
| 50 |
EINVAL |
| 51 |
The ``start`` or ``length`` is incorrect, or no buffers have been |
| 52 |
mapped yet. |