Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: DTV.dmx
0003 
0004 .. _dmx-munmap:
0005 
0006 ************
0007 DVB munmap()
0008 ************
0009 
0010 Name
0011 ====
0012 
0013 dmx-munmap - Unmap device memory
0014 
0015 .. warning:: This API is still experimental.
0016 
0017 Synopsis
0018 ========
0019 
0020 .. code-block:: c
0021 
0022     #include <unistd.h>
0023     #include <sys/mman.h>
0024 
0025 .. c:function:: int munmap( void *start, size_t length )
0026 
0027 Arguments
0028 =========
0029 
0030 ``start``
0031     Address of the mapped buffer as returned by the
0032     :c:func:`mmap()` function.
0033 
0034 ``length``
0035     Length of the mapped buffer. This must be the same value as given to
0036     :c:func:`mmap()`.
0037 
0038 Description
0039 ===========
0040 
0041 Unmaps a previously with the :c:func:`mmap()` function mapped
0042 buffer and frees it, if possible.
0043 
0044 Return Value
0045 ============
0046 
0047 On success :c:func:`munmap()` returns 0, on failure -1 and the
0048 ``errno`` variable is set appropriately:
0049 
0050 EINVAL
0051     The ``start`` or ``length`` is incorrect, or no buffers have been
0052     mapped yet.