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