← Documents Documentation/userspace-api/media/dvb/fe-get-event.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / DVB / Frontend

FE_GET_EVENT

Deprecated frontend event 조회와 blocking/non-blocking 동작을 설명합니다.

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

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

1. 요약·해설

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

요약·해설

fe-get-event.rst:1-67

Deprecated event queue ioctl입니다. Non-blocking event 부재와 queue overflow를 별도 errno로 구분합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2 .. c:namespace:: DTV.fe
3
4 .. _FE_GET_EVENT:
5
6 ************
7 FE_GET_EVENT
8 ************
9
10 Name
11 ====
12
13 FE_GET_EVENT
14
15 .. attention:: This ioctl is deprecated.
16
17 Synopsis
18 ========
19
20 .. c:macro:: FE_GET_EVENT
21
22 ``int ioctl(int fd, FE_GET_EVENT, struct dvb_frontend_event *ev)``
23
24 Arguments
25 =========
26
27 ``fd``
28 File descriptor returned by :c:func:`open()`.
29
30 ``ev``
31 Points to the location where the event, if any, is to be stored.
32
33 Description
34 ===========
35
36 This ioctl call returns a frontend event if available. If an event is
37 not available, the behavior depends on whether the device is in blocking
38 or non-blocking mode. In the latter case, the call fails immediately
39 with errno set to ``EWOULDBLOCK``. In the former case, the call blocks until
40 an event becomes available.
41
42 Return Value
43 ============
44
45 On success 0 is returned.
46
47 On error -1 is returned, and the ``errno`` variable is set
48 appropriately.
49
50 .. flat-table::
51 :header-rows: 0
52 :stub-columns: 0
53
54 - .. row 1
55
56 - ``EWOULDBLOCK``
57
58 - There is no event pending, and the device is in non-blocking mode.
59
60 - .. row 2
61
62 - ``EOVERFLOW``
63
64 - Overflow in event queue - one or more events were lost.
65
66 Generic error codes are described at the
67 :ref:`Generic Error Codes <gen-errors>` chapter.
68

3. 한국어 전문 번역

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

Deprecated event 조회 선언과 인수

1-32

`FE_GET_EVENT`는 deprecated된 ioctl입니다. 호출 형식은 `int ioctl(int fd, FE_GET_EVENT, struct dvb_frontend_event *ev)`입니다.

FE_GET_EVENT 인수
인수의미
fdopen()이 반환한 파일 descriptor
evevent가 있으면 저장할 dvb_frontend_event 위치를 가리키는 포인터

Frontend event를 저장할 위치를 전달합니다.

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

.. _FE_GET_EVENT:

************
FE_GET_EVENT
************

Name
====

FE_GET_EVENT

.. attention:: This ioctl is deprecated.

Synopsis
========

.. c:macro:: FE_GET_EVENT

``int ioctl(int fd, FE_GET_EVENT, struct dvb_frontend_event *ev)``

Arguments
=========

``fd``
    File descriptor returned by :c:func:`open()`.

``ev``
    Points to the location where the event, if any, is to be stored.

Blocking mode와 event queue 오류

33-67

사용 가능한 frontend event가 있으면 이 ioctl이 반환합니다. event가 없을 때 동작은 장치의 blocking mode에 따라 달라집니다.

Non-blocking mode에서는 즉시 실패하고 `errno`를 `EWOULDBLOCK`으로 설정합니다. Blocking mode에서는 event가 생길 때까지 호출이 대기합니다.

성공 시 0, 오류 시 -1을 반환하고 `errno`를 적절히 설정합니다.

FE_GET_EVENT 전용 오류
오류조건
EWOULDBLOCK대기 중인 event가 없고 장치가 non-blocking mode임
EOVERFLOWEvent queue overflow로 하나 이상의 event가 유실됨

원문 flat-table의 오류 code와 조건입니다.

Frontend event 조회
FE_GET_EVENT 호출대기 중인 event가 있으면 ev에 저장없고 non-blocking이면 EWOULDBLOCK 반환없고 blocking이면 event가 생길 때까지 대기Queue overflow면 EOVERFLOW로 유실 알림

장치 mode에 따라 event 부재 처리 방식이 갈립니다.

그 밖의 일반 오류는 `Generic Error Codes <gen-errors>` 절을 따릅니다.

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

This ioctl call returns a frontend event if available. If an event is
not available, the behavior depends on whether the device is in blocking
or non-blocking mode. In the latter case, the call fails immediately
with errno set to ``EWOULDBLOCK``. In the former case, the call blocks until
an event becomes available.

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

On success 0 is returned.

On error -1 is returned, and the ``errno`` variable is set
appropriately.

.. flat-table::
    :header-rows:  0
    :stub-columns: 0

    -  .. row 1

       -  ``EWOULDBLOCK``

       -  There is no event pending, and the device is in non-blocking mode.

    -  .. row 2

       -  ``EOVERFLOW``

       -  Overflow in event queue - one or more events were lost.

Generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.