← Documents Documentation/userspace-api/media/dvb/dmx-munmap.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / DVB / Demux

DVB munmap()

mmap으로 만든 Demux 버퍼 매핑을 해제합니다.

Source pathDocumentation/userspace-api/media/dvb/dmx-munmap.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

dmx-munmap.rst:1-52

munmap은 mmap이 반환한 시작 주소와 같은 length를 사용해 매핑을 해제하고 가능한 경우 버퍼 자원도 해제합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

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

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

이름, 실험 상태와 호출 형식

1-25

이 문서는 GFDL-1.1-no-invariants-or-later 라이선스와 `DTV.dmx` C namespace를 사용하며 DVB의 `munmap()` 인터페이스를 설명합니다.

`dmx-munmap`은 장치 메모리 매핑을 해제하며 이 API는 아직 실험적입니다.

사용자는 `unistd.h`와 `sys/mman.h`를 포함하며, 함수 원형은 `int munmap(void *start, size_t length)`입니다.

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.dmx

.. _dmx-munmap:

************
DVB munmap()
************

Name
====

dmx-munmap - Unmap device memory

.. warning:: This API is still experimental.

Synopsis
========

.. code-block:: c

    #include <unistd.h>
    #include <sys/mman.h>

.. c:function:: int munmap( void *start, size_t length )

인자와 매핑 해제

26-42

`start`는 `mmap()`이 반환한 매핑 버퍼 주소입니다.

`length`는 매핑 버퍼의 길이이며 `mmap()`에 전달했던 값과 정확히 같아야 합니다.

이 함수는 앞서 `mmap()`으로 매핑한 버퍼의 매핑을 해제하고, 가능하면 그 버퍼를 해제합니다.

Demux 버퍼 매핑 해제
mmap()으로 start 주소와 length의 매핑 생성버퍼 사용 완료munmap(start, length) 호출매핑 해제와 가능한 버퍼 자원 해제

mmap 반환값과 같은 길이를 짝으로 사용합니다.


Arguments
=========

``start``
    Address of the mapped buffer as returned by the
    :c:func:`mmap()` function.

``length``
    Length of the mapped buffer. This must be the same value as given to
    :c:func:`mmap()`.

Description
===========

Unmaps a previously with the :c:func:`mmap()` function mapped
buffer and frees it, if possible.

반환값과 EINVAL

43-52

성공하면 `munmap()`은 0을 반환하고, 실패하면 -1을 반환하며 `errno`를 적절히 설정합니다.

DVB munmap 오류
오류조건
EINVALstart 또는 length가 잘못되었거나 아직 매핑한 버퍼가 없음

문서가 명시한 EINVAL 조건입니다.


Return Value
============

On success :c:func:`munmap()` returns 0, on failure -1 and the
``errno`` variable is set appropriately:

EINVAL
    The ``start`` or ``length`` is incorrect, or no buffers have been
    mapped yet.