53 lines · plain
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later2.. c:namespace:: DTV.dmx3 4.. _dmx-munmap:5 6************7DVB munmap()8************9 10Name11====12 13dmx-munmap - Unmap device memory14 15.. warning:: This API is still experimental.16 17Synopsis18========19 20.. code-block:: c21 22 #include <unistd.h>23 #include <sys/mman.h>24 25.. c:function:: int munmap( void *start, size_t length )26 27Arguments28=========29 30``start``31 Address of the mapped buffer as returned by the32 :c:func:`mmap()` function.33 34``length``35 Length of the mapped buffer. This must be the same value as given to36 :c:func:`mmap()`.37 38Description39===========40 41Unmaps a previously with the :c:func:`mmap()` function mapped42buffer and frees it, if possible.43 44Return Value45============46 47On success :c:func:`munmap()` returns 0, on failure -1 and the48``errno`` variable is set appropriately:49 50EINVAL51 The ``start`` or ``length`` is incorrect, or no buffers have been52 mapped yet.53