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