1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2.. c:namespace:: DTV.dmx 3 4.. _dmx-munmap: 5 6************ 7DVB munmap() 8************ 9 10Name 11==== 12 13dmx-munmap - Unmap device memory 14 15.. warning:: This API is still experimental. 16 17Synopsis 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 27Arguments 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 38Description 39=========== 40 41Unmaps a previously with the :c:func:`mmap()` function mapped 42buffer and frees it, if possible. 43 44Return Value 45============ 46 47On success :c:func:`munmap()` returns 0, on failure -1 and the 48``errno`` variable is set appropriately: 49 50EINVAL 51 The ``start`` or ``length`` is incorrect, or no buffers have been 52 mapped yet. 53