Documentation/driver-api/tty/tty_internals.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

TTY Internals

kernel space에서 TTY를 열고 닫는 함수, 공개된 내부 TTY core helper와 tty_io.c 내부 함수를 설명하는 한국어 전문 번역입니다.

Source pathDocumentation/driver-api/tty/tty_internals.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

tty_internals.rst:1-31

TTY core는 kernel-space 전용 open·close 함수와 일부 exported internal helper를 제공합니다. 나머지 `tty_io.c` 구현 함수는 별도의 internal kernel-doc 범위로 문서화됩니다.

문서 구성
원문 줄핵심 내용
1-17kernel-space open·close
18-25공개 내부 helper
26-31구현 내부 함수

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 =============
4 TTY Internals
5 =============
6
7 .. contents:: :local:
8
9 Kopen
10 =====
11
12 These functions serve for opening a TTY from the kernelspace:
13
14 .. kernel-doc:: drivers/tty/tty_io.c
15 :identifiers: tty_kopen_exclusive tty_kopen_shared tty_kclose
16
17 ----
18
19 Exported Internal Functions
20 ===========================
21
22 .. kernel-doc:: drivers/tty/tty_io.c
23 :identifiers: tty_release_struct tty_dev_name_to_number tty_get_icount
24
25 ----
26
27 Internal Functions
28 ==================
29
30 .. kernel-doc:: drivers/tty/tty_io.c
31 :internal:
32

3. 한국어 전문 번역

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

Kernel-space TTY open과 close

1-17

Kopen 절의 함수들은 kernel space에서 TTY를 여는 데 사용됩니다. `tty_kopen_exclusive`는 배타적 open 경로를, `tty_kopen_shared`는 공유 open 경로를, `tty_kclose`는 이에 대응하는 close를 제공합니다.

세 함수의 kernel-doc은 모두 `drivers/tty/tty_io.c`에서 가져옵니다. 호출 조건, 반환값과 수명 규칙의 상세 계약은 해당 source의 주석이 문서에 확장합니다.

Kernel-space TTY 수명주기
배타적 사용 필요`tty_kopen_exclusive`
공유 사용 필요`tty_kopen_shared`
kernel-space TTY 사용`tty_kclose`

필요한 공유 방식에 따라 open 함수를 선택하고 사용 후 close합니다.

.. SPDX-License-Identifier: GPL-2.0

=============
TTY Internals
=============

.. contents:: :local:

Kopen
=====

These functions serve for opening a TTY from the kernelspace:

.. kernel-doc:: drivers/tty/tty_io.c
      :identifiers: tty_kopen_exclusive tty_kopen_shared tty_kclose

----

공개된 내부 함수

18-25

Exported Internal Functions 절은 `drivers/tty/tty_io.c`의 세 도우미를 문서화합니다. `tty_release_struct`는 TTY 구조체 해제 경로, `tty_dev_name_to_number`는 device name을 number로 해석하는 경로, `tty_get_icount`는 serial counter 조회 경로에 해당합니다.

Exported internal helpers
identifier역할 범주source path
`tty_release_struct`TTY 구조체 release`drivers/tty/tty_io.c`
`tty_dev_name_to_number`device name을 number로 변환`drivers/tty/tty_io.c`
`tty_get_icount`TTY interrupt·serial counter 조회`drivers/tty/tty_io.c`


Exported Internal Functions
===========================

.. kernel-doc:: drivers/tty/tty_io.c
   :identifiers: tty_release_struct tty_dev_name_to_number tty_get_icount

----

구현 내부 함수

26-31

마지막 절은 `drivers/tty/tty_io.c`에서 `:internal:`로 분류된 kernel-doc을 포함합니다. 외부에 노출한 도우미와 구분되는 TTY core 구현 내부 함수가 이 위치에 생성됩니다.

내부 함수 문서
source path선택 범위
`drivers/tty/tty_io.c``:internal:` 함수


Internal Functions
==================

.. kernel-doc:: drivers/tty/tty_io.c
   :internal: