dmx-munmap.rst 950 B

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