Esphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget0/translations/zh_CN/driver-api/tty/tty_internalsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/zh_TW/driver-api/tty/tty_internalsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/it_IT/driver-api/tty/tty_internalsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ja_JP/driver-api/tty/tty_internalsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ko_KR/driver-api/tty/tty_internalsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/pt_BR/driver-api/tty/tty_internalsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/sp_SP/driver-api/tty/tty_internalsmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhJ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals.rsthKubhsection)}(hhh](htitle)}(h TTY Internalsh]h TTY Internals}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhtopic)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]h paragraph)}(hhh]h reference)}(hhh]hKopen}(hhhhhNhNubah}(h]id1ah ]h"]h$]h&]refidkopenuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hExported Internal Functions}(hjhhhNhNubah}(h]id2ah ]h"]h$]h&]refidexported-internal-functionsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hInternal Functions}(hj7hhhNhNubah}(h]id3ah ]h"]h$]h&]refidinternal-functionsuh1hhj4ubah}(h]h ]h"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhNhNubah}(h]contentsah ](contentslocaleh"]contentsah$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hKopenh]hKopen}(hjfhhhNhNubah}(h]h ]h"]h$]h&]refidhuh1hhjchhhhhK ubh)}(h=These functions serve for opening a TTY from the kernelspace:h]h=These functions serve for opening a TTY from the kernelspace:}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjchhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singletty_kclose (C function) c.tty_kclosehNtauh1jhjchhhNhNubhdesc)}(hhh](hdesc_signature)}(h(void tty_kclose (struct tty_struct *tty)h]hdesc_signature_line)}(h'void tty_kclose(struct tty_struct *tty)h](hdesc_sig_keyword_type)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMgubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhMgubh desc_name)}(h tty_kcloseh]h desc_sig_name)}(h tty_kcloseh]h tty_kclose}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhjhMgubhdesc_parameterlist)}(h(struct tty_struct *tty)h]hdesc_parameter)}(hstruct tty_struct *ttyh](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j1 ASTIdentifier)}j,jsb c.tty_kcloseasbuh1hhjubj)}(h h]h }(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubhdesc_sig_punctuation)}(h*h]h*}(hjNhhhNhNubah}(h]h ]pah"]h$]h&]uh1jLhjubj)}(httyh]htty}(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMgubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jsphinx_line_type declaratorhjhhhjhMgubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhMghjhhubh desc_content)}(hhh]h)}(hcloses tty opened by tty_kopenh]hcloses tty opened by tty_kopen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMghjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMgubeh}(h]h ](j*functioneh"]h$]h&]domainj*objtypejdesctypejnoindex noindexentrynocontentsentryuh1jhhhjchNhNubh container)}(h**Parameters** ``struct tty_struct *tty`` tty device **Description** Performs the final steps to release and free a tty device. It is the same as tty_release_struct() except that it also resets ``TTY_PORT_KOPENED`` flag on **tty->port**.h](h)}(h**Parameters**h]hstrong)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMkhjubhdefinition_list)}(hhh]hdefinition_list_item)}(h&``struct tty_struct *tty`` tty device h](hterm)}(h``struct tty_struct *tty``h]hliteral)}(hjh]hstruct tty_struct *tty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhhjubh definition)}(hhh]h)}(h tty deviceh]h tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj!h]h Description}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMjhjubh)}(hPerforms the final steps to release and free a tty device. It is the same as tty_release_struct() except that it also resets ``TTY_PORT_KOPENED`` flag on **tty->port**.h](h}Performs the final steps to release and free a tty device. It is the same as tty_release_struct() except that it also resets }(hj7hhhNhNubj)}(h``TTY_PORT_KOPENED``h]hTTY_PORT_KOPENED}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh flag on }(hj7hhhNhNubj)}(h **tty->port**h]h tty->port}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMihjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjchhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j tty_kopen_exclusive (C function)c.tty_kopen_exclusivehNtauh1jhjchhhNhNubj)}(hhh](j)}(h6struct tty_struct * tty_kopen_exclusive (dev_t device)h]j)}(h4struct tty_struct *tty_kopen_exclusive(dev_t device)h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjmodnameN classnameNj0j3)}j6]j9)}j,tty_kopen_exclusivesbc.tty_kopen_exclusiveasbuh1hhjhhhjhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubjM)}(hjPh]h*}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhhjhMubj)}(htty_kopen_exclusiveh]j)}(hjh]htty_kopen_exclusive}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMubj)}(h(dev_t device)h]j)}(h dev_t deviceh](h)}(hhh]j)}(hdev_th]hdev_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj modnameN classnameNj0j3)}j6]jc.tty_kopen_exclusiveasbuh1hhjubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hdeviceh]hdevice}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjhhhjhMubah}(h]j}ah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjhhubj)}(hhh]h)}(hopen a tty device for kernelh]hopen a tty device for kernel}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjZhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](j*functioneh"]h$]h&]jj*jjujjujjjuh1jhhhjchNhNubj)}(hX**Parameters** ``dev_t device`` dev_t of device to open **Description** Opens tty exclusively for kernel. Performs the driver lookup, makes sure it's not already opened and performs the first-time tty initialization. Claims the global ``tty_mutex`` to serialize: * concurrent first-time tty initialization * concurrent tty driver removal w/ lookup * concurrent tty removal from driver table **Return** the locked initialized :c:type:`tty_struct`h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjyubj)}(hhh]j)}(h)``dev_t device`` dev_t of device to open h](j)}(h``dev_t device``h]j)}(hjh]h dev_t device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjubj)}(hhh]h)}(hdev_t of device to openh]hdev_t of device to open}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjyubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjyubh)}(hOpens tty exclusively for kernel. Performs the driver lookup, makes sure it's not already opened and performs the first-time tty initialization.h]hOpens tty exclusively for kernel. Performs the driver lookup, makes sure it’s not already opened and performs the first-time tty initialization.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjyubj)}(hhh]j)}(hClaims the global ``tty_mutex`` to serialize: * concurrent first-time tty initialization * concurrent tty driver removal w/ lookup * concurrent tty removal from driver table h](j)}(h-Claims the global ``tty_mutex`` to serialize:h](hClaims the global }(hjhhhNhNubj)}(h ``tty_mutex``h]h tty_mutex}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to serialize:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjubj)}(hhh]h)}(hhh](h)}(h(concurrent first-time tty initializationh]h)}(hj.h]h(concurrent first-time tty initialization}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhj,ubah}(h]h ]h"]h$]h&]uh1hhj)ubh)}(h'concurrent tty driver removal w/ lookuph]h)}(hjFh]h'concurrent tty driver removal w/ lookup}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjDubah}(h]h ]h"]h$]h&]uh1hhj)ubh)}(h)concurrent tty removal from driver table h]h)}(h(concurrent tty removal from driver tableh]h(concurrent tty removal from driver table}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMhj\ubah}(h]h ]h"]h$]h&]uh1hhj)ubeh}(h]h ]h"]h$]h&]bulletjPuh1hhj=hMhj&ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj%hMhjubah}(h]h ]h"]h$]h&]uh1jhjyubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjyubh)}(h+the locked initialized :c:type:`tty_struct`h](hthe locked initialized }(hjhhhNhNubh)}(h:c:type:`tty_struct`h]j)}(hjh]h tty_struct}(hjhhhNhNubah}(h]h ](xrefj*c-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocdriver-api/tty/tty_internals refdomainj*reftypetype refexplicitrefwarnj0j3)}j6]sb reftarget tty_structuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjubeh}(h]h ]h"]h$]h&]uh1hhjhMhjyubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjchhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_kopen_shared (C function)c.tty_kopen_sharedhNtauh1jhjchhhNhNubj)}(hhh](j)}(h3struct tty_struct * tty_kopen_shared (dev_t device)h]j)}(h1struct tty_struct *tty_kopen_shared(dev_t device)h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjmodnameN classnameNj0j3)}j6]j9)}j,tty_kopen_sharedsbc.tty_kopen_sharedasbuh1hhjhhhjhMubj)}(h h]h }(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubjM)}(hjPh]h*}(hjGhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhhjhMubj)}(htty_kopen_sharedh]j)}(hj6h]htty_kopen_shared}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMubj)}(h(dev_t device)h]j)}(h dev_t deviceh](h)}(hhh]j)}(hdev_th]hdev_t}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjxmodnameN classnameNj0j3)}j6]j4c.tty_kopen_sharedasbuh1hhjoubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjkubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjhhubj)}(hhh]h)}(h*open a tty device for shared in-kernel useh]h*open a tty device for shared in-kernel use}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](j*functioneh"]h$]h&]jj*jjjjjjjuh1jhhhjchNhNubj)}(h**Parameters** ``dev_t device`` dev_t of device to open **Description** Opens an already existing tty for in-kernel use. Compared to tty_kopen_exclusive() above it doesn't ensure to be the only user. Locking: identical to tty_kopen() above.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjubj)}(hhh]j)}(h)``dev_t device`` dev_t of device to open h](j)}(h``dev_t device``h]j)}(hj h]h dev_t device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjubj)}(hhh]h)}(hdev_t of device to openh]hdev_t of device to open}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMhj#ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj"hMhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjHh]h Description}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjubh)}(hOpens an already existing tty for in-kernel use. Compared to tty_kopen_exclusive() above it doesn't ensure to be the only user.h]hOpens an already existing tty for in-kernel use. Compared to tty_kopen_exclusive() above it doesn’t ensure to be the only user.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjubh)}(h(Locking: identical to tty_kopen() above.h]h(Locking: identical to tty_kopen() above.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:14: ./drivers/tty/tty_io.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjchhhNhNubeh}(h]jah ]h"]kopenah$]h&]uh1hhhhhhhhK ubh transition)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhKhhhhubh)}(hhh](h)}(hExported Internal Functionsh]hExported Internal Functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]jtjuh1hhjhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#tty_dev_name_to_number (C function)c.tty_dev_name_to_numberhNtauh1jhjhhhNhNubj)}(hhh](j)}(h h]hstruct tty_struct *tty}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj< ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chMhj8 ubj)}(hhh]h)}(h tty deviceh]h tty device}(hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjS hMhjT ubah}(h]h ]h"]h$]h&]uh1jhj8 ubeh}(h]h ]h"]h$]h&]uh1jhjS hMhj5 ubj)}(h``int idx`` index of the tty h](j)}(h ``int idx``h]j)}(hjw h]hint idx}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1jhju ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chMhjq ubj)}(hhh]h)}(hindex of the ttyh]hindex of the tty}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jhjq ubeh}(h]h ]h"]h$]h&]uh1jhj hMhj5 ubeh}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chMhj ubh)}(hgPerforms the final steps to release and free a tty device. It is roughly the reverse of tty_init_dev().h]hgPerforms the final steps to release and free a tty device. It is roughly the reverse of tty_init_dev().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_get_icount (C function)c.tty_get_icounthNtauh1jhjhhhNhNubj)}(hhh](j)}(hRint tty_get_icount (struct tty_struct *tty, struct serial_icounter_struct *icount)h]j)}(hQint tty_get_icount(struct tty_struct *tty, struct serial_icounter_struct *icount)h](j)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chM ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hM ubj)}(htty_get_icounth]j)}(htty_get_icounth]htty_get_icount}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj hM ubj)}(h?(struct tty_struct *tty, struct serial_icounter_struct *icount)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj4 hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0 ubj)}(h h]h }(hjA hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0 ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjR hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjO ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjT modnameN classnameNj0j3)}j6]j9)}j,j sbc.tty_get_icountasbuh1hhj0 ubj)}(h h]h }(hjr hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0 ubjM)}(hjPh]h*}(hj hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj0 ubj)}(httyh]htty}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0 ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj, ubj)}(h%struct serial_icounter_struct *icounth](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j)}(hserial_icounter_structh]hserial_icounter_struct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj modnameN classnameNj0j3)}j6]jn c.tty_get_icountasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjM)}(hjPh]h*}(hj hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj ubj)}(hicounth]hicount}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj, ubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhj hM ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhj hhhj hM ubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj hM hj hhubj)}(hhh]h)}(hget tty statisticsh]hget tty statistics}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chM hj$ hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hM ubeh}(h]h ](j*functioneh"]h$]h&]jj*jj? jj? jjjuh1jhhhjhNhNubj)}(h**Parameters** ``struct tty_struct *tty`` tty device ``struct serial_icounter_struct *icount`` output parameter **Description** Gets a copy of the **tty**'s icount statistics. Locking: none (up to the driver)h](h)}(h**Parameters**h]j)}(hjI h]h Parameters}(hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjG ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chM hjC ubj)}(hhh](j)}(h&``struct tty_struct *tty`` tty device h](j)}(h``struct tty_struct *tty``h]j)}(hjh h]hstruct tty_struct *tty}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjf ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chM hjb ubj)}(hhh]h)}(h tty deviceh]h tty device}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj} hM hj~ ubah}(h]h ]h"]h$]h&]uh1jhjb ubeh}(h]h ]h"]h$]h&]uh1jhj} hM hj_ ubj)}(h;``struct serial_icounter_struct *icount`` output parameter h](j)}(h)``struct serial_icounter_struct *icount``h]j)}(hj h]h%struct serial_icounter_struct *icount}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chM hj ubj)}(hhh]h)}(houtput parameterh]houtput parameter}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hM hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hM hj_ ubeh}(h]h ]h"]h$]h&]uh1jhjC ubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chM hjC ubh)}(h/Gets a copy of the **tty**'s icount statistics.h](hGets a copy of the }(hj hhhNhNubj)}(h**tty**h]htty}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh’s icount statistics.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chM hjC ubh)}(h Locking: none (up to the driver)h]h Locking: none (up to the driver)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:22: ./drivers/tty/tty_io.chM hjC ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubeh}(h]j$ah ]h"]exported internal functionsah$]h&]uh1hhhhhhhhKubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhKhhhhubh)}(hhh](h)}(hInternal Functionsh]hInternal Functions}(hj=hhhNhNubah}(h]h ]h"]h$]h&]jtj@uh1hhj:hhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jfree_tty_struct (C function)c.free_tty_structhNtauh1jhj:hhhNhNubj)}(hhh](j)}(h-void free_tty_struct (struct tty_struct *tty)h]j)}(h,void free_tty_struct(struct tty_struct *tty)h](j)}(hvoidh]hvoid}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKubj)}(h h]h }(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`hhhjrhKubj)}(hfree_tty_structh]j)}(hfree_tty_structh]hfree_tty_struct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhj`hhhjrhKubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjmodnameN classnameNj0j3)}j6]j9)}j,jsbc.free_tty_structasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjM)}(hjPh]h*}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(httyh]htty}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhj`hhhjrhKubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhj\hhhjrhKubah}(h]jWah ](jjeh"]h$]h&]jj)jhuh1jhjrhKhjYhhubj)}(hhh]h)}(hfree a disused ttyh]hfree a disused tty}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhj!hhubah}(h]h ]h"]h$]h&]uh1jhjYhhhjrhKubeh}(h]h ](j*functioneh"]h$]h&]jj*jj<jj<jjjuh1jhhhj:hNhNubj)}(h**Parameters** ``struct tty_struct *tty`` tty struct to free **Description** Free the write buffers, tty queue and tty memory itself. Locking: none. Must be called after tty is definitely unusedh](h)}(h**Parameters**h]j)}(hjFh]h Parameters}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhj@ubj)}(hhh]j)}(h.``struct tty_struct *tty`` tty struct to free h](j)}(h``struct tty_struct *tty``h]j)}(hjeh]hstruct tty_struct *tty}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhj_ubj)}(hhh]h)}(htty struct to freeh]htty struct to free}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhKhj{ubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhjzhKhj\ubah}(h]h ]h"]h$]h&]uh1jhj@ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhj@ubh)}(h8Free the write buffers, tty queue and tty memory itself.h]h8Free the write buffers, tty queue and tty memory itself.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhj@ubh)}(hhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubh)}(hhh]j)}(hfileh]hfile}(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjQmodnameN classnameNj0j3)}j6]j9)}j,jsbc.tty_free_fileasbuh1hhj-ubj)}(h h]h }(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubjM)}(hjPh]h*}(hj}hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj-ubj)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj)ubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKhjhhubj)}(hhh]h)}(hfree file->private_datah]hfree file->private_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](j*functioneh"]h$]h&]jj*jjjjjjjuh1jhhhj:hNhNubj)}(h**Parameters** ``struct file *file`` to free private_data of **Description** This shall be used only for fail path handling when tty_add_file was not called yet.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhjubj)}(hhh]j)}(h.``struct file *file`` to free private_data of h](j)}(h``struct file *file``h]j)}(hjh]hstruct file *file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhjubj)}(hhh]h)}(hto free private_data ofh]hto free private_data of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj0h]h Description}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhjubh)}(hTThis shall be used only for fail path handling when tty_add_file was not called yet.h]hTThis shall be used only for fail path handling when tty_add_file was not called yet.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jget_tty_driver (C function)c.get_tty_driverhNtauh1jhj:hhhNhNubj)}(hhh](j)}(h=struct tty_driver * get_tty_driver (dev_t device, int *index)h]j)}(h;struct tty_driver *get_tty_driver(dev_t device, int *index)h](j)}(hjh]hstruct}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM)ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqhhhjhM)ubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjmodnameN classnameNj0j3)}j6]j9)}j,get_tty_driversbc.get_tty_driverasbuh1hhjqhhhjhM)ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqhhhjhM)ubjM)}(hjPh]h*}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjqhhhjhM)ubj)}(hget_tty_driverh]j)}(hjh]hget_tty_driver}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjqhhhjhM)ubj)}(h(dev_t device, int *index)h](j)}(h dev_t deviceh](h)}(hhh]j)}(hdev_th]hdev_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjmodnameN classnameNj0j3)}j6]jc.get_tty_driverasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h int *indexh](j)}(hinth]hint}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubjM)}(hjPh]h*}(hjShhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj3ubj)}(hindexh]hindex}(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjqhhhjhM)ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjmhhhjhM)ubah}(h]jhah ](jjeh"]h$]h&]jj)jhuh1jhjhM)hjjhhubj)}(hhh]h)}(hfind device of a ttyh]hfind device of a tty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM)hjhhubah}(h]h ]h"]h$]h&]uh1jhjjhhhjhM)ubeh}(h]h ](j*functioneh"]h$]h&]jj*jjjjjjjuh1jhhhj:hNhNubj)}(hX**Parameters** ``dev_t device`` device identifier ``int *index`` returns the index of the tty **Description** This routine returns a tty driver structure, given a device number and also passes back the index number. Locking: caller must hold tty_mutexh](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM-hjubj)}(hhh](j)}(h#``dev_t device`` device identifier h](j)}(h``dev_t device``h]j)}(hjh]h dev_t device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM*hjubj)}(hhh]h)}(hdevice identifierh]hdevice identifier}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM*hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM*hjubj)}(h,``int *index`` returns the index of the tty h](j)}(h``int *index``h]j)}(hjh]h int *index}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM+hjubj)}(hhh]h)}(hreturns the index of the ttyh]hreturns the index of the tty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM+hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM+hjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj?h]h Description}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM-hjubh)}(hiThis routine returns a tty driver structure, given a device number and also passes back the index number.h]hiThis routine returns a tty driver structure, given a device number and also passes back the index number.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM,hjubh)}(h#Locking: caller must hold tty_mutexh]h#Locking: caller must hold tty_mutex}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM/hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!tty_release_redirect (C function)c.tty_release_redirecthNtauh1jhj:hhhNhNubj)}(hhh](j)}(h;struct file * tty_release_redirect (struct tty_struct *tty)h]j)}(h9struct file *tty_release_redirect(struct tty_struct *tty)h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhM ubh)}(hhh]j)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjmodnameN classnameNj0j3)}j6]j9)}j,tty_release_redirectsbc.tty_release_redirectasbuh1hhjhhhjhM ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhM ubjM)}(hjPh]h*}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhhjhM ubj)}(htty_release_redirecth]j)}(hjh]htty_release_redirect}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhM ubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj-modnameN classnameNj0j3)}j6]jc.tty_release_redirectasbuh1hhj ubj)}(h h]h }(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjM)}(hjPh]h*}(hjWhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj ubj)}(httyh]htty}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhM ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjhhhjhM ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhM hjhhubj)}(hhh]h)}(h&Release a redirect on a pty if presenth]h&Release a redirect on a pty if present}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM ubeh}(h]h ](j*functioneh"]h$]h&]jj*jjjjjjjuh1jhhhj:hNhNubj)}(h**Parameters** ``struct tty_struct *tty`` tty device **Description** This is available to the pty code so if the master closes, if the slave is a redirect it can release the redirect.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjubj)}(hhh]j)}(h&``struct tty_struct *tty`` tty device h](j)}(h``struct tty_struct *tty``h]j)}(hjh]hstruct tty_struct *tty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjubj)}(hhh]h)}(h tty deviceh]h tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM hjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjubh)}(hrThis is available to the pty code so if the master closes, if the slave is a redirect it can release the redirect.h]hrThis is available to the pty code so if the master closes, if the slave is a redirect it can release the redirect.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j__tty_hangup (C function)c.__tty_hanguphNtauh1jhj:hhhNhNubj)}(hhh](j)}(hsiglock to protect ->signal/->sighand(h](h)}(h**Parameters**h]j)}(hjfh]h Parameters}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM$hj`ubj)}(hhh](j)}(h&``struct tty_struct *tty`` tty device h](j)}(h``struct tty_struct *tty``h]j)}(hjh]hstruct tty_struct *tty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM!hjubj)}(hhh]h)}(h tty deviceh]h tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM!hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM!hj|ubj)}(hH``int exit_session`` if non-zero, signal all foreground group processes h](j)}(h``int exit_session``h]j)}(hjh]hint exit_session}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM"hjubj)}(hhh]h)}(h2if non-zero, signal all foreground group processesh]h2if non-zero, signal all foreground group processes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM"hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM"hj|ubeh}(h]h ]h"]h$]h&]uh1jhj`ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM$hj`ubh)}(hThis can be called by a "kworker" kernel thread. That is process synchronous but doesn't hold any locks, so we need to make sure we have the appropriate locks for what we're doing.h]hThis can be called by a “kworker” kernel thread. That is process synchronous but doesn’t hold any locks, so we need to make sure we have the appropriate locks for what we’re doing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM#hj`ubh)}(hThe hangup event clears any pending redirections onto the hung up device. It ensures future writes will error and it does the needed line discipline hangup and signal delivery. The tty object itself remains intact.h]hThe hangup event clears any pending redirections onto the hung up device. It ensures future writes will error and it does the needed line discipline hangup and signal delivery. The tty object itself remains intact.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM'hj`ubj)}(hhh]j)}(hXLocking: * BTM * redirect lock for undoing redirection * file list lock for manipulating list of ttys * tty_ldiscs_lock from called functions * termios_rwsem resetting termios data * tasklist_lock to walk task list for hangup event * ->siglock to protect ->signal/->sighandh](j)}(hLocking:h]hLocking:}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM3hj0ubj)}(hhh](h)}(hhh]h)}(hBTM h]h)}(hBTMh]hBTM}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM,hjIubah}(h]h ]h"]h$]h&]uh1hhjFubah}(h]h ]h"]h$]h&]jzjPuh1hhj[hM,hjCubh block_quote)}(hX* redirect lock for undoing redirection * file list lock for manipulating list of ttys * tty_ldiscs_lock from called functions * termios_rwsem resetting termios data * tasklist_lock to walk task list for hangup event * ->siglock to protect ->signal/->sighandh](h)}(hhh](h)}(h%redirect lock for undoing redirectionh]h)}(hjsh]h%redirect lock for undoing redirection}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM.hjqubah}(h]h ]h"]h$]h&]uh1hhjnubh)}(h,file list lock for manipulating list of ttysh]h)}(hjh]h,file list lock for manipulating list of ttys}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM/hjubah}(h]h ]h"]h$]h&]uh1hhjnubh)}(h%tty_ldiscs_lock from called functionsh]h)}(hjh]h%tty_ldiscs_lock from called functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM0hjubah}(h]h ]h"]h$]h&]uh1hhjnubh)}(h$termios_rwsem resetting termios datah]h)}(hjh]h$termios_rwsem resetting termios data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM1hjubah}(h]h ]h"]h$]h&]uh1hhjnubh)}(h1tasklist_lock to walk task list for hangup event h]h)}(h0tasklist_lock to walk task list for hangup eventh]h0tasklist_lock to walk task list for hangup event}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM2hjubah}(h]h ]h"]h$]h&]uh1hhjnubeh}(h]h ]h"]h$]h&]jzjPuh1hhjhM.hjjubji)}(h)* ->siglock to protect ->signal/->sighandh]h)}(hhh]h)}(h'->siglock to protect ->signal/->sighandh]h)}(hjh]h'->siglock to protect ->signal/->sighand}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM4hjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]jzjPuh1hhjhM4hjubah}(h]h ]h"]h$]h&]uh1jhhjhM4hjjubeh}(h]h ]h"]h$]h&]uh1jhhjhM.hjCubeh}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhjBhM3hj-ubah}(h]h ]h"]h$]h&]uh1jhj`ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_vhangup_self (C function)c.tty_vhangup_selfhNtauh1jhj:hhhNhNubj)}(hhh](j)}(hvoid tty_vhangup_self (void)h]j)}(hvoid tty_vhangup_self(void)h](j)}(hvoidh]hvoid}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOhhhjahMubj)}(htty_vhangup_selfh]j)}(htty_vhangup_selfh]htty_vhangup_self}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubah}(h]h ](jjeh"]h$]h&]hhuh1jhjOhhhjahMubj)}(h(void)h]j)}(hvoidh]j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjOhhhjahMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjKhhhjahMubah}(h]jFah ](jjeh"]h$]h&]jj)jhuh1jhjahMhjHhhubj)}(hhh]h)}(hprocess vhangup for own cttyh]hprocess vhangup for own ctty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjHhhhjahMubeh}(h]h ](j*functioneh"]h$]h&]jj*jjjjjjjuh1jhhhj:hNhNubj)}(hj**Parameters** ``void`` no arguments **Description** Perform a vhangup on the current controlling ttyh](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjubj)}(hhh]j)}(h``void`` no arguments h](j)}(h``void``h]j)}(hjh]hvoid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhjubj)}(hhh]h)}(h no argumentsh]h no arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj6h]h Description}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chKhjubh)}(h0Perform a vhangup on the current controlling ttyh]h0Perform a vhangup on the current controlling tty}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j tty_vhangup_session (C function)c.tty_vhangup_sessionhNtauh1jhj:hhhNhNubj)}(hhh](j)}(h1void tty_vhangup_session (struct tty_struct *tty)h]j)}(h0void tty_vhangup_session(struct tty_struct *tty)h](j)}(hvoidh]hvoid}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwhhhjhMubj)}(htty_vhangup_sessionh]j)}(htty_vhangup_sessionh]htty_vhangup_session}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjwhhhjhMubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjmodnameN classnameNj0j3)}j6]j9)}j,jsbc.tty_vhangup_sessionasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjM)}(hjPh]h*}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(httyh]htty}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjwhhhjhMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjshhhjhMubah}(h]jnah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjphhubj)}(hhh]h)}(hhangup session leader exith]hhangup session leader exit}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj8hhubah}(h]h ]h"]h$]h&]uh1jhjphhhjhMubeh}(h]h ](j*functioneh"]h$]h&]jj*jjSjjSjjjuh1jhhhj:hNhNubj)}(hX`**Parameters** ``struct tty_struct *tty`` tty to hangup **Description** The session leader is exiting and hanging up its controlling terminal. Every process in the foreground process group is signalled ``SIGHUP``. We do this synchronously so that when the syscall returns the process is complete. That guarantee is necessary for security reasons.h](h)}(h**Parameters**h]j)}(hj]h]h Parameters}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjWubj)}(hhh]j)}(h)``struct tty_struct *tty`` tty to hangup h](j)}(h``struct tty_struct *tty``h]j)}(hj|h]hstruct tty_struct *tty}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjvubj)}(hhh]h)}(h tty to hanguph]h tty to hangup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]uh1jhjhMhjsubah}(h]h ]h"]h$]h&]uh1jhjWubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjWubh)}(hThe session leader is exiting and hanging up its controlling terminal. Every process in the foreground process group is signalled ``SIGHUP``.h](hThe session leader is exiting and hanging up its controlling terminal. Every process in the foreground process group is signalled }(hjhhhNhNubj)}(h ``SIGHUP``h]hSIGHUP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjWubh)}(hWe do this synchronously so that when the syscall returns the process is complete. That guarantee is necessary for security reasons.h]hWe do this synchronously so that when the syscall returns the process is complete. That guarantee is necessary for security reasons.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjWubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_read (C function) c.tty_readhNtauh1jhj:hhhNhNubj)}(hhh](j)}(h:ssize_t tty_read (struct kiocb *iocb, struct iov_iter *to)h]j)}(h9ssize_t tty_read(struct kiocb *iocb, struct iov_iter *to)h](h)}(hhh]j)}(hssize_th]hssize_t}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj"modnameN classnameNj0j3)}j6]j9)}j,tty_readsb c.tty_readasbuh1hhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMzubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjAhMzubj)}(htty_readh]j)}(hj>h]htty_read}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjAhMzubj)}(h)(struct kiocb *iocb, struct iov_iter *to)h](j)}(hstruct kiocb *iocbh](j)}(hjh]hstruct}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubh)}(hhh]j)}(hkiocbh]hkiocb}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjmodnameN classnameNj0j3)}j6]j< c.tty_readasbuh1hhjkubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubjM)}(hjPh]h*}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjkubj)}(hiocbh]hiocb}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjgubj)}(hstruct iov_iter *toh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hiov_iterh]hiov_iter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjmodnameN classnameNj0j3)}j6]j< c.tty_readasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjM)}(hjPh]h*}(hj)hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(htoh]hto}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjgubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjAhMzubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjhhhjAhMzubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjAhMzhjhhubj)}(hhh]h)}(h read method for tty device filesh]h read method for tty device files}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMzhj]hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjAhMzubeh}(h]h ](j*functioneh"]h$]h&]jj*jjxjjxjjjuh1jhhhj:hNhNubj)}(hX**Parameters** ``struct kiocb *iocb`` kernel I/O control block ``struct iov_iter *to`` destination for the data read **Description** Perform the read system call function on this terminal device. Checks for hung up devices before calling the line discipline method. Locking: Locks the line discipline internally while needed. Multiple read calls may be outstanding in parallel.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM~hj|ubj)}(hhh](j)}(h0``struct kiocb *iocb`` kernel I/O control block h](j)}(h``struct kiocb *iocb``h]j)}(hjh]hstruct kiocb *iocb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM{hjubj)}(hhh]h)}(hkernel I/O control blockh]hkernel I/O control block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM{hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM{hjubj)}(h6``struct iov_iter *to`` destination for the data read h](j)}(h``struct iov_iter *to``h]j)}(hjh]hstruct iov_iter *to}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM|hjubj)}(hhh]h)}(hdestination for the data readh]hdestination for the data read}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM|hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM|hjubeh}(h]h ]h"]h$]h&]uh1jhj|ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM~hj|ubh)}(hPerform the read system call function on this terminal device. Checks for hung up devices before calling the line discipline method.h]hPerform the read system call function on this terminal device. Checks for hung up devices before calling the line discipline method.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM}hj|ubj)}(hhh]j)}(hoLocking: Locks the line discipline internally while needed. Multiple read calls may be outstanding in parallel.h](j)}(hLocking:h]hLocking:}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj=ubj)}(hhh]h)}(hfLocks the line discipline internally while needed. Multiple read calls may be outstanding in parallel.h]hfLocks the line discipline internally while needed. Multiple read calls may be outstanding in parallel.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjPubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jhjOhMhj:ubah}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_write_message (C function)c.tty_write_messagehNtauh1jhj:hhhNhNubj)}(hhh](j)}(h:void tty_write_message (struct tty_struct *tty, char *msg)h]j)}(h9void tty_write_message(struct tty_struct *tty, char *msg)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhM ubj)}(htty_write_messageh]j)}(htty_write_messageh]htty_write_message}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhM ubj)}(h#(struct tty_struct *tty, char *msg)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjmodnameN classnameNj0j3)}j6]j9)}j,jsbc.tty_write_messageasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjM)}(hjPh]h*}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(httyh]htty}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h char *msgh](j)}(hcharh]hchar}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubj)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubjM)}(hjPh]h*}(hj^hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj>ubj)}(hmsgh]hmsg}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhM ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjhhhjhM ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhM hjhhubj)}(hhh]h)}(h7write a message to a certain tty, not just the console.h]h7write a message to a certain tty, not just the console.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM ubeh}(h]h ](j*functioneh"]h$]h&]jj*jjjjjjjuh1jhhhj:hNhNubj)}(hX**Parameters** ``struct tty_struct *tty`` the destination tty_struct ``char *msg`` the message to write **Description** This is used for messages that need to be redirected to a specific tty. We don't put it into the syslog queue right now maybe in the future if really needed. We must still hold the BTM and test the CLOSING flag for the moment. This function is DEPRECATED, do not use in new code.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjubj)}(hhh](j)}(h6``struct tty_struct *tty`` the destination tty_struct h](j)}(h``struct tty_struct *tty``h]j)}(hjh]hstruct tty_struct *tty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjubj)}(hhh]h)}(hthe destination tty_structh]hthe destination tty_struct}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h#``char *msg`` the message to write h](j)}(h ``char *msg``h]j)}(hjh]h char *msg}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj ubj)}(hhh]h)}(hthe message to writeh]hthe message to write}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj%ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj$hMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjJh]h Description}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjubh)}(hThis is used for messages that need to be redirected to a specific tty. We don't put it into the syslog queue right now maybe in the future if really needed.h]hThis is used for messages that need to be redirected to a specific tty. We don’t put it into the syslog queue right now maybe in the future if really needed.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjubh)}(hDWe must still hold the BTM and test the CLOSING flag for the moment.h]hDWe must still hold the BTM and test the CLOSING flag for the moment.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjubh)}(h4This function is DEPRECATED, do not use in new code.h]h4This function is DEPRECATED, do not use in new code.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_write (C function) c.tty_writehNtauh1jhj:hhhNhNubj)}(hhh](j)}(h=ssize_t tty_write (struct kiocb *iocb, struct iov_iter *from)h]j)}(h'ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjC'modnameN classnameNj0j3)}j6]j&c.tty_line_nameasbuh1hhj'ubj)}(h h]h }(hj_'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubjM)}(hjPh]h*}(hjm'hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj'ubj)}(hdriverh]hdriver}(hjz'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj'ubj)}(h int indexh](j)}(hinth]hint}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(hindexh]hindex}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj'ubj)}(hchar *ph](j)}(hcharh]hchar}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubjM)}(hjPh]h*}(hj'hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj'ubj)}(hjYh]hp}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj'ubeh}(h]h ]h"]h$]h&]hhuh1jhj&hhhj&hMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhj&hhhj&hMubah}(h]j&ah ](jjeh"]h$]h&]jj)jhuh1jhj&hMhj&hhubj)}(hhh]h)}(hgenerate name for a ttyh]hgenerate name for a tty}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj(hhubah}(h]h ]h"]h$]h&]uh1jhj&hhhj&hMubeh}(h]h ](j*functioneh"]h$]h&]jj*jj2(jj2(jjjuh1jhhhj:hNhNubj)}(hX**Parameters** ``struct tty_driver *driver`` the tty driver in use ``int index`` the minor number ``char *p`` output buffer of at least 7 bytes **Description** Generate a name from a **driver** reference and write it to the output buffer **p**. Locking: Noneh](h)}(h**Parameters**h]j)}(hj<(h]h Parameters}(hj>(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:(ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj6(ubj)}(hhh](j)}(h4``struct tty_driver *driver`` the tty driver in use h](j)}(h``struct tty_driver *driver``h]j)}(hj[(h]hstruct tty_driver *driver}(hj](hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjY(ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjU(ubj)}(hhh]h)}(hthe tty driver in useh]hthe tty driver in use}(hjt(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjp(hMhjq(ubah}(h]h ]h"]h$]h&]uh1jhjU(ubeh}(h]h ]h"]h$]h&]uh1jhjp(hMhjR(ubj)}(h``int index`` the minor number h](j)}(h ``int index``h]j)}(hj(h]h int index}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj(ubj)}(hhh]h)}(hthe minor numberh]hthe minor number}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hMhjR(ubj)}(h.``char *p`` output buffer of at least 7 bytes h](j)}(h ``char *p``h]j)}(hj(h]hchar *p}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj(ubj)}(hhh]h)}(h!output buffer of at least 7 bytesh]h!output buffer of at least 7 bytes}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hMhjR(ubeh}(h]h ]h"]h$]h&]uh1jhj6(ubh)}(h**Description**h]j)}(hj)h]h Description}(hj )hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj6(ubh)}(hTGenerate a name from a **driver** reference and write it to the output buffer **p**.h](hGenerate a name from a }(hj)hhhNhNubj)}(h **driver**h]hdriver}(hj&)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh- reference and write it to the output buffer }(hj)hhhNhNubj)}(h**p**h]hp}(hj8)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj6(ubh)}(h Locking: Noneh]h Locking: None}(hjQ)hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj6(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"tty_driver_lookup_tty (C function)c.tty_driver_lookup_ttyhNtauh1jhj:hhhNhNubj)}(hhh](j)}(hastruct tty_struct * tty_driver_lookup_tty (struct tty_driver *driver, struct file *file, int idx)h]j)}(h_struct tty_struct *tty_driver_lookup_tty(struct tty_driver *driver, struct file *file, int idx)h](j)}(hjh]hstruct}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|)hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|)hhhj)hMubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj)modnameN classnameNj0j3)}j6]j9)}j,tty_driver_lookup_ttysbc.tty_driver_lookup_ttyasbuh1hhj|)hhhj)hMubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|)hhhj)hMubjM)}(hjPh]h*}(hj)hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj|)hhhj)hMubj)}(htty_driver_lookup_ttyh]j)}(hj)h]htty_driver_lookup_tty}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj|)hhhj)hMubj)}(h7(struct tty_driver *driver, struct file *file, int idx)h](j)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj*modnameN classnameNj0j3)}j6]j)c.tty_driver_lookup_ttyasbuh1hhj)ubj)}(h h]h }(hj6*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubjM)}(hjPh]h*}(hjD*hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj)ubj)}(hdriverh]hdriver}(hjQ*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj)ubj)}(hstruct file *fileh](j)}(hjh]hstruct}(hjj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf*ubj)}(h h]h }(hjw*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf*ubh)}(hhh]j)}(hfileh]hfile}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj*modnameN classnameNj0j3)}j6]j)c.tty_driver_lookup_ttyasbuh1hhjf*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf*ubjM)}(hjPh]h*}(hj*hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjf*ubj)}(hfileh]hfile}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj)ubj)}(hint idxh](j)}(hinth]hint}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(hidxh]hidx}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj)ubeh}(h]h ]h"]h$]h&]hhuh1jhj|)hhhj)hMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjx)hhhj)hMubah}(h]js)ah ](jjeh"]h$]h&]jj)jhuh1jhj)hMhju)hhubj)}(hhh]h)}(hfind an existing tty, if anyh]hfind an existing tty, if any}(hj +hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj+hhubah}(h]h ]h"]h$]h&]uh1jhju)hhhj)hMubeh}(h]h ](j*functioneh"]h$]h&]jj*jj8+jj8+jjjuh1jhhhj:hNhNubj)}(hXa**Parameters** ``struct tty_driver *driver`` the driver for the tty ``struct file *file`` file object ``int idx`` the minor number **Return** the tty, if found. If not found, return ``NULL`` or ERR_PTR() if the driver lookup() method returns an error. **Description** Locking: tty_mutex must be held. If the tty is found, bump the tty kref.h](h)}(h**Parameters**h]j)}(hjB+h]h Parameters}(hjD+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@+ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj<+ubj)}(hhh](j)}(h5``struct tty_driver *driver`` the driver for the tty h](j)}(h``struct tty_driver *driver``h]j)}(hja+h]hstruct tty_driver *driver}(hjc+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_+ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj[+ubj)}(hhh]h)}(hthe driver for the ttyh]hthe driver for the tty}(hjz+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjv+hMhjw+ubah}(h]h ]h"]h$]h&]uh1jhj[+ubeh}(h]h ]h"]h$]h&]uh1jhjv+hMhjX+ubj)}(h"``struct file *file`` file object h](j)}(h``struct file *file``h]j)}(hj+h]hstruct file *file}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj+ubj)}(hhh]h)}(h file objecth]h file object}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj+hMhjX+ubj)}(h``int idx`` the minor number h](j)}(h ``int idx``h]j)}(hj+h]hint idx}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj+ubj)}(hhh]h)}(hthe minor numberh]hthe minor number}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj+hMhjX+ubeh}(h]h ]h"]h$]h&]uh1jhj<+ubh)}(h **Return**h]j)}(hj,h]hReturn}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ,ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj<+ubh)}(hmthe tty, if found. If not found, return ``NULL`` or ERR_PTR() if the driver lookup() method returns an error.uh](h(the tty, if found. If not found, return }(hj$,hhhNhNubj)}(h``NULL``h]hNULL}(hj,,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$,ubh= or ERR_PTR() if the driver lookup() method returns an error.}(hj$,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj<+ubh)}(h**Description**h]j)}(hjG,h]h Description}(hjI,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE,ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj<+ubh)}(hHLocking: tty_mutex must be held. If the tty is found, bump the tty kref.h]hHLocking: tty_mutex must be held. If the tty is found, bump the tty kref.}(hj],hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj<+ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#tty_driver_install_tty (C function)c.tty_driver_install_ttyhNtauh1jhj:hhhNhNubj)}(hhh](j)}(hNint tty_driver_install_tty (struct tty_driver *driver, struct tty_struct *tty)h]j)}(hMint tty_driver_install_tty(struct tty_driver *driver, struct tty_struct *tty)h](j)}(hinth]hint}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,hhhj,hMubj)}(htty_driver_install_ttyh]j)}(htty_driver_install_ttyh]htty_driver_install_tty}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj,hhhj,hMubj)}(h3(struct tty_driver *driver, struct tty_struct *tty)h](j)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj,modnameN classnameNj0j3)}j6]j9)}j,j,sbc.tty_driver_install_ttyasbuh1hhj,ubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubjM)}(hjPh]h*}(hj-hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj,ubj)}(hdriverh]hdriver}(hj"-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj,ubj)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj;-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7-ubj)}(h h]h }(hjH-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7-ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjY-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV-ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj[-modnameN classnameNj0j3)}j6]j-c.tty_driver_install_ttyasbuh1hhj7-ubj)}(h h]h }(hjw-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7-ubjM)}(hjPh]h*}(hj-hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj7-ubj)}(httyh]htty}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7-ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj,ubeh}(h]h ]h"]h$]h&]hhuh1jhj,hhhj,hMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhj,hhhj,hMubah}(h]j,ah ](jjeh"]h$]h&]jj)jhuh1jhj,hMhj,hhubj)}(hhh]h)}(h!install a tty entry in the driverh]h!install a tty entry in the driver}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj-hhubah}(h]h ]h"]h$]h&]uh1jhj,hhhj,hMubeh}(h]h ](j*functioneh"]h$]h&]jj*jj-jj-jjjuh1jhhhj:hNhNubj)}(hXm**Parameters** ``struct tty_driver *driver`` the driver for the tty ``struct tty_struct *tty`` the tty **Description** Install a tty object into the driver tables. The **tty->index** field will be set by the time this is called. This method is responsible for ensuring any need additional structures are allocated and configured. Locking: tty_mutex for nowh](h)}(h**Parameters**h]j)}(hj-h]h Parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj-ubj)}(hhh](j)}(h5``struct tty_driver *driver`` the driver for the tty h](j)}(h``struct tty_driver *driver``h]j)}(hj-h]hstruct tty_driver *driver}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj-ubj)}(hhh]h)}(hthe driver for the ttyh]hthe driver for the tty}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hMhj.ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhj.hMhj-ubj)}(h#``struct tty_struct *tty`` the tty h](j)}(h``struct tty_struct *tty``h]j)}(hj6.h]hstruct tty_struct *tty}(hj8.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4.ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj0.ubj)}(hhh]h)}(hthe ttyh]hthe tty}(hjO.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK.hMhjL.ubah}(h]h ]h"]h$]h&]uh1jhj0.ubeh}(h]h ]h"]h$]h&]uh1jhjK.hMhj-ubeh}(h]h ]h"]h$]h&]uh1jhj-ubh)}(h**Description**h]j)}(hjq.h]h Description}(hjs.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo.ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj-ubh)}(hInstall a tty object into the driver tables. The **tty->index** field will be set by the time this is called. This method is responsible for ensuring any need additional structures are allocated and configured.h](h1Install a tty object into the driver tables. The }(hj.hhhNhNubj)}(h**tty->index**h]h tty->index}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh field will be set by the time this is called. This method is responsible for ensuring any need additional structures are allocated and configured.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj-ubh)}(hLocking: tty_mutex for nowh]hLocking: tty_mutex for now}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"tty_driver_remove_tty (C function)c.tty_driver_remove_ttyhNtauh1jhj:hhhNhNubj)}(hhh](j)}(hNvoid tty_driver_remove_tty (struct tty_driver *driver, struct tty_struct *tty)h]j)}(hMvoid tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct *tty)h](j)}(hvoidh]hvoid}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhhj.hMubj)}(htty_driver_remove_ttyh]j)}(htty_driver_remove_ttyh]htty_driver_remove_tty}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj.hhhj.hMubj)}(h3(struct tty_driver *driver, struct tty_struct *tty)h](j)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj)}(h h]h }(hj!/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hj2/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj//ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj4/modnameN classnameNj0j3)}j6]j9)}j,j.sbc.tty_driver_remove_ttyasbuh1hhj/ubj)}(h h]h }(hjR/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubjM)}(hjPh]h*}(hj`/hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj/ubj)}(hdriverh]hdriver}(hjm/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj /ubj)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj/modnameN classnameNj0j3)}j6]jN/c.tty_driver_remove_ttyasbuh1hhj/ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubjM)}(hjPh]h*}(hj/hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj/ubj)}(httyh]htty}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj /ubeh}(h]h ]h"]h$]h&]hhuh1jhj.hhhj.hMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhj.hhhj.hMubah}(h]j.ah ](jjeh"]h$]h&]jj)jhuh1jhj.hMhj.hhubj)}(hhh]h)}(h#remove a tty from the driver tablesh]h#remove a tty from the driver tables}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj0hhubah}(h]h ]h"]h$]h&]uh1jhj.hhhj.hMubeh}(h]h ](j*functioneh"]h$]h&]jj*jj0jj0jjjuh1jhhhj:hNhNubj)}(hX **Parameters** ``struct tty_driver *driver`` the driver for the tty ``struct tty_struct *tty`` tty to remove **Description** Remove a tty object from the driver tables. The tty->index field will be set by the time this is called. Locking: tty_mutex for nowh](h)}(h**Parameters**h]j)}(hj)0h]h Parameters}(hj+0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'0ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj#0ubj)}(hhh](j)}(h5``struct tty_driver *driver`` the driver for the tty h](j)}(h``struct tty_driver *driver``h]j)}(hjH0h]hstruct tty_driver *driver}(hjJ0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF0ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjB0ubj)}(hhh]h)}(hthe driver for the ttyh]hthe driver for the tty}(hja0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]0hMhj^0ubah}(h]h ]h"]h$]h&]uh1jhjB0ubeh}(h]h ]h"]h$]h&]uh1jhj]0hMhj?0ubj)}(h)``struct tty_struct *tty`` tty to remove h](j)}(h``struct tty_struct *tty``h]j)}(hj0h]hstruct tty_struct *tty}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj{0ubj)}(hhh]h)}(h tty to removeh]h tty to remove}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMhj0ubah}(h]h ]h"]h$]h&]uh1jhj{0ubeh}(h]h ]h"]h$]h&]uh1jhj0hMhj?0ubeh}(h]h ]h"]h$]h&]uh1jhj#0ubh)}(h**Description**h]j)}(hj0h]h Description}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj#0ubh)}(hhRemove a tty object from the driver tables. The tty->index field will be set by the time this is called.h]hhRemove a tty object from the driver tables. The tty->index field will be set by the time this is called.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj#0ubh)}(hLocking: tty_mutex for nowh]hLocking: tty_mutex for now}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj#0ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_reopen (C function) c.tty_reopenhNtauh1jhj:hhhNhNubj)}(hhh](j)}(h'int tty_reopen (struct tty_struct *tty)h]j)}(h&int tty_reopen(struct tty_struct *tty)h](j)}(hinth]hint}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 1hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM&ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 1hhhj1hM&ubj)}(h tty_reopenh]j)}(h tty_reopenh]h tty_reopen}(hj11hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-1ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj 1hhhj1hM&ubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjM1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI1ubj)}(h h]h }(hjZ1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI1ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjk1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh1ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjm1modnameN classnameNj0j3)}j6]j9)}j,j31sb c.tty_reopenasbuh1hhjI1ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI1ubjM)}(hjPh]h*}(hj1hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjI1ubj)}(httyh]htty}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI1ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjE1ubah}(h]h ]h"]h$]h&]hhuh1jhj 1hhhj1hM&ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhj1hhhj1hM&ubah}(h]j1ah ](jjeh"]h$]h&]jj)jhuh1jhj1hM&hj1hhubj)}(hhh]h)}(hfast re-open of an open ttyh]hfast re-open of an open tty}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM&hj1hhubah}(h]h ]h"]h$]h&]uh1jhj1hhhj1hM&ubeh}(h]h ](j*functioneh"]h$]h&]jj*jj1jj1jjjuh1jhhhj:hNhNubj)}(h**Parameters** ``struct tty_struct *tty`` the tty to open **Description** Re-opens on master ptys are not allowed and return -``EIO``. Locking: Caller must hold tty_lock **Return** 0 on success, -errno on error.h](h)}(h**Parameters**h]j)}(hj1h]h Parameters}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM*hj1ubj)}(hhh]j)}(h+``struct tty_struct *tty`` the tty to open h](j)}(h``struct tty_struct *tty``h]j)}(hj2h]hstruct tty_struct *tty}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM'hj 2ubj)}(hhh]h)}(hthe tty to openh]hthe tty to open}(hj*2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&2hM'hj'2ubah}(h]h ]h"]h$]h&]uh1jhj 2ubeh}(h]h ]h"]h$]h&]uh1jhj&2hM'hj2ubah}(h]h ]h"]h$]h&]uh1jhj1ubh)}(h**Description**h]j)}(hjL2h]h Description}(hjN2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ2ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM)hj1ubh)}(hhjJ<ubj)}(hhh]h)}(h tty to checkh]h tty to check}(hji<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhje<hM>hjf<ubah}(h]h ]h"]h$]h&]uh1jhjJ<ubeh}(h]h ]h"]h$]h&]uh1jhje<hM>hjG<ubj)}(h``int idx`` index of the tty h](j)}(h ``int idx``h]j)}(hj<h]hint idx}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM?hj<ubj)}(hhh]h)}(hindex of the ttyh]hindex of the tty}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hM?hj<ubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhj<hM?hjG<ubeh}(h]h ]h"]h$]h&]uh1jhj+<ubh)}(h**Description**h]j)}(hj<h]h Description}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMAhj+<ubh)}(h}Performs some paranoid checking before true release of the **tty**. This is a no-op unless ``TTY_PARANOIA_CHECK`` is defined.h](h;Performs some paranoid checking before true release of the }(hj<hhhNhNubj)}(h**tty**h]htty}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh. This is a no-op unless }(hj<hhhNhNubj)}(h``TTY_PARANOIA_CHECK``h]hTTY_PARANOIA_CHECK}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh is defined.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM@hj+<ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_release (C function) c.tty_releasehNtauh1jhj:hhhNhNubj)}(hhh](j)}(h8int tty_release (struct inode *inode, struct file *filp)h]j)}(h7int tty_release(struct inode *inode, struct file *filp)h](j)}(hinth]hint}(hj-=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)=hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMubj)}(h h]h }(hj<=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)=hhhj;=hMubj)}(h tty_releaseh]j)}(h tty_releaseh]h tty_release}(hjN=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJ=ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj)=hhhj;=hMubj)}(h((struct inode *inode, struct file *filp)h](j)}(hstruct inode *inodeh](j)}(hjh]hstruct}(hjj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf=ubj)}(h h]h }(hjw=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf=ubh)}(hhh]j)}(hinodeh]hinode}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj=modnameN classnameNj0j3)}j6]j9)}j,jP=sb c.tty_releaseasbuh1hhjf=ubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf=ubjM)}(hjPh]h*}(hj=hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjf=ubj)}(hinodeh]hinode}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf=ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjb=ubj)}(hstruct file *filph](j)}(hjh]hstruct}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubh)}(hhh]j)}(hfileh]hfile}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj=modnameN classnameNj0j3)}j6]j= c.tty_releaseasbuh1hhj=ubj)}(h h]h }(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubjM)}(hjPh]h*}(hj&>hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj=ubj)}(hfilph]hfilp}(hj3>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjb=ubeh}(h]h ]h"]h$]h&]hhuh1jhj)=hhhj;=hMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhj%=hhhj;=hMubah}(h]j =ah ](jjeh"]h$]h&]jj)jhuh1jhj;=hMhj"=hhubj)}(hhh]h)}(hvfs callback for closeh]hvfs callback for close}(hj]>hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjZ>hhubah}(h]h ]h"]h$]h&]uh1jhj"=hhhj;=hMubeh}(h]h ](j*functioneh"]h$]h&]jj*jju>jju>jjjuh1jhhhj:hNhNubj)}(hXi**Parameters** ``struct inode *inode`` inode of tty ``struct file *filp`` file pointer for handle to tty **Description** Called the last time each file handle is closed that references this tty. There may however be several such references. Locking: Takes BKL. See tty_release_dev(). Even releasing the tty structures is a tricky business. We have to be very careful that the structures are all released at the same time, as interrupts might otherwise get the wrong pointers. WSH 09/09/97: rewritten to avoid some nasty race conditions that could lead to double frees or releasing memory still in use.h](h)}(h**Parameters**h]j)}(hj>h]h Parameters}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}>ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjy>ubj)}(hhh](j)}(h%``struct inode *inode`` inode of tty h](j)}(h``struct inode *inode``h]j)}(hj>h]hstruct inode *inode}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj>ubj)}(hhh]h)}(h inode of ttyh]h inode of tty}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhj>hMhj>ubj)}(h5``struct file *filp`` file pointer for handle to tty h](j)}(h``struct file *filp``h]j)}(hj>h]hstruct file *filp}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj>ubj)}(hhh]h)}(hfile pointer for handle to ttyh]hfile pointer for handle to tty}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhj>hMhj>ubeh}(h]h ]h"]h$]h&]uh1jhjy>ubh)}(h**Description**h]j)}(hj?h]h Description}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjy>ubh)}(hwCalled the last time each file handle is closed that references this tty. There may however be several such references.h]hwCalled the last time each file handle is closed that references this tty. There may however be several such references.}(hj(?hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjy>ubj)}(hhh]j)}(h+Locking: Takes BKL. See tty_release_dev(). h](j)}(hLocking:h]hLocking:}(hj>?hhhNhNubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj:?ubj)}(hhh]h)}(h!Takes BKL. See tty_release_dev().h]h!Takes BKL. See tty_release_dev().}(hjP?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjL?hMhjM?ubah}(h]h ]h"]h$]h&]uh1jhj:?ubeh}(h]h ]h"]h$]h&]uh1jhjL?hMhj7?ubah}(h]h ]h"]h$]h&]uh1jhjy>ubh)}(hEven releasing the tty structures is a tricky business. We have to be very careful that the structures are all released at the same time, as interrupts might otherwise get the wrong pointers.h]hEven releasing the tty structures is a tricky business. We have to be very careful that the structures are all released at the same time, as interrupts might otherwise get the wrong pointers.}(hjp?hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjy>ubh)}(h}WSH 09/09/97: rewritten to avoid some nasty race conditions that could lead to double frees or releasing memory still in use.h]h}WSH 09/09/97: rewritten to avoid some nasty race conditions that could lead to double frees or releasing memory still in use.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjy>ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!tty_open_current_tty (C function)c.tty_open_current_ttyhNtauh1jhj:hhhNhNubj)}(hhh](j)}(hJstruct tty_struct * tty_open_current_tty (dev_t device, struct file *filp)h]j)}(hHstruct tty_struct *tty_open_current_tty(dev_t device, struct file *filp)h](j)}(hjh]hstruct}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMAubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?hhhj?hMAubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj?modnameN classnameNj0j3)}j6]j9)}j,tty_open_current_ttysbc.tty_open_current_ttyasbuh1hhj?hhhj?hMAubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?hhhj?hMAubjM)}(hjPh]h*}(hj?hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj?hhhj?hMAubj)}(htty_open_current_ttyh]j)}(hj?h]htty_open_current_tty}(hj @hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj @ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj?hhhj?hMAubj)}(h!(dev_t device, struct file *filp)h](j)}(h dev_t deviceh](h)}(hhh]j)}(hdev_th]hdev_t}(hj+@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(@ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj-@modnameN classnameNj0j3)}j6]j?c.tty_open_current_ttyasbuh1hhj$@ubj)}(h h]h }(hjI@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$@ubj)}(hdeviceh]hdevice}(hjW@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$@ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj @ubj)}(hstruct file *filph](j)}(hjh]hstruct}(hjp@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjl@ubj)}(h h]h }(hj}@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjl@ubh)}(hhh]j)}(hfileh]hfile}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj@modnameN classnameNj0j3)}j6]j?c.tty_open_current_ttyasbuh1hhjl@ubj)}(h h]h }(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjl@ubjM)}(hjPh]h*}(hj@hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjl@ubj)}(hfilph]hfilp}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjl@ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj @ubeh}(h]h ]h"]h$]h&]hhuh1jhj?hhhj?hMAubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhj?hhhj?hMAubah}(h]j?ah ](jjeh"]h$]h&]jj)jhuh1jhj?hMAhj?hhubj)}(hhh]h)}(hget locked tty of current taskh]hget locked tty of current task}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMAhj@hhubah}(h]h ]h"]h$]h&]uh1jhj?hhhj?hMAubeh}(h]h ](j*functioneh"]h$]h&]jj*jj Ajj Ajjjuh1jhhhj:hNhNubj)}(hXw**Parameters** ``dev_t device`` device number ``struct file *filp`` file pointer to tty **Return** locked tty of the current task iff **device** is /dev/tty **Description** Performs a re-open of the current task's controlling tty. We cannot return driver and index like for the other nodes because devpts will not work then. It expects inodes to be from devpts FS.h](h)}(h**Parameters**h]j)}(hjAh]h Parameters}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMEhj Aubj)}(hhh](j)}(h``dev_t device`` device number h](j)}(h``dev_t device``h]j)}(hj2Ah]h dev_t device}(hj4AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0Aubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMBhj,Aubj)}(hhh]h)}(h device numberh]h device number}(hjKAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGAhMBhjHAubah}(h]h ]h"]h$]h&]uh1jhj,Aubeh}(h]h ]h"]h$]h&]uh1jhjGAhMBhj)Aubj)}(h*``struct file *filp`` file pointer to tty h](j)}(h``struct file *filp``h]j)}(hjkAh]hstruct file *filp}(hjmAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiAubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMChjeAubj)}(hhh]h)}(hfile pointer to ttyh]hfile pointer to tty}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMChjAubah}(h]h ]h"]h$]h&]uh1jhjeAubeh}(h]h ]h"]h$]h&]uh1jhjAhMChj)Aubeh}(h]h ]h"]h$]h&]uh1jhj Aubh)}(h **Return**h]j)}(hjAh]hReturn}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMEhj Aubh)}(h9locked tty of the current task iff **device** is /dev/ttyh](h#locked tty of the current task iff }(hjAhhhNhNubj)}(h **device**h]hdevice}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh is /dev/tty}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMDhj Aubh)}(h**Description**h]j)}(hjAh]h Description}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMFhj Aubh)}(h9Performs a re-open of the current task's controlling tty.h]h;Performs a re-open of the current task’s controlling tty.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMEhj Aubh)}(hWe cannot return driver and index like for the other nodes because devpts will not work then. It expects inodes to be from devpts FS.h]hWe cannot return driver and index like for the other nodes because devpts will not work then. It expects inodes to be from devpts FS.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMGhj Aubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_lookup_driver (C function)c.tty_lookup_driverhNtauh1jhj:hhhNhNubj)}(hhh](j)}(hSstruct tty_driver * tty_lookup_driver (dev_t device, struct file *filp, int *index)h]j)}(hQstruct tty_driver *tty_lookup_driver(dev_t device, struct file *filp, int *index)h](j)}(hjh]hstruct}(hj3BhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/Bhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMeubj)}(h h]h }(hjABhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/Bhhhj@BhMeubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hjRBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOBubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjTBmodnameN classnameNj0j3)}j6]j9)}j,tty_lookup_driversbc.tty_lookup_driverasbuh1hhj/Bhhhj@BhMeubj)}(h h]h }(hjsBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/Bhhhj@BhMeubjM)}(hjPh]h*}(hjBhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj/Bhhhj@BhMeubj)}(htty_lookup_driverh]j)}(hjpBh]htty_lookup_driver}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubah}(h]h ](jjeh"]h$]h&]hhuh1jhj/Bhhhj@BhMeubj)}(h-(dev_t device, struct file *filp, int *index)h](j)}(h dev_t deviceh](h)}(hhh]j)}(hdev_th]hdev_t}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjBmodnameN classnameNj0j3)}j6]jnBc.tty_lookup_driverasbuh1hhjBubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubj)}(hdeviceh]hdevice}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjBubj)}(hstruct file *filph](j)}(hjh]hstruct}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubj)}(h h]h }(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubh)}(hhh]j)}(hfileh]hfile}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjCmodnameN classnameNj0j3)}j6]jnBc.tty_lookup_driverasbuh1hhjBubj)}(h h]h }(hj1ChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubjM)}(hjPh]h*}(hj?ChhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjBubj)}(hfilph]hfilp}(hjLChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjBubj)}(h int *indexh](j)}(hinth]hint}(hjeChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaCubj)}(h h]h }(hjsChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaCubjM)}(hjPh]h*}(hjChhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjaCubj)}(hindexh]hindex}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaCubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjBubeh}(h]h ]h"]h$]h&]hhuh1jhj/Bhhhj@BhMeubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhj+Bhhhj@BhMeubah}(h]j&Bah ](jjeh"]h$]h&]jj)jhuh1jhj@BhMehj(Bhhubj)}(hhh]h)}(h+lookup a tty driver for a given device fileh]h+lookup a tty driver for a given device file}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMehjChhubah}(h]h ]h"]h$]h&]uh1jhj(Bhhhj@BhMeubeh}(h]h ](j*functioneh"]h$]h&]jj*jjCjjCjjjuh1jhhhj:hNhNubj)}(hX**Parameters** ``dev_t device`` device number ``struct file *filp`` file pointer to tty ``int *index`` index for the device in the **return** driver **Description** If returned value is not erroneous, the caller is responsible to decrement the refcount by tty_driver_kref_put(). Locking: ``tty_mutex`` protects get_tty_driver() **Return** driver for this inode (with increased refcount)h](h)}(h**Parameters**h]j)}(hjCh]h Parameters}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMihjCubj)}(hhh](j)}(h``dev_t device`` device number h](j)}(h``dev_t device``h]j)}(hjCh]h dev_t device}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMfhjCubj)}(hhh]h)}(h device numberh]h device number}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhMfhjDubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhjDhMfhjCubj)}(h*``struct file *filp`` file pointer to tty h](j)}(h``struct file *filp``h]j)}(hj2Dh]hstruct file *filp}(hj4DhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0Dubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMghj,Dubj)}(hhh]h)}(hfile pointer to ttyh]hfile pointer to tty}(hjKDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGDhMghjHDubah}(h]h ]h"]h$]h&]uh1jhj,Dubeh}(h]h ]h"]h$]h&]uh1jhjGDhMghjCubj)}(h=``int *index`` index for the device in the **return** driver h](j)}(h``int *index``h]j)}(hjkDh]h int *index}(hjmDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiDubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhhjeDubj)}(hhh]h)}(h-index for the device in the **return** driverh](hindex for the device in the }(hjDhhhNhNubj)}(h **return**h]hreturn}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubh driver}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjDhMhhjDubah}(h]h ]h"]h$]h&]uh1jhjeDubeh}(h]h ]h"]h$]h&]uh1jhjDhMhhjCubeh}(h]h ]h"]h$]h&]uh1jhjCubh)}(h**Description**h]j)}(hjDh]h Description}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMjhjCubh)}(hqIf returned value is not erroneous, the caller is responsible to decrement the refcount by tty_driver_kref_put().h]hqIf returned value is not erroneous, the caller is responsible to decrement the refcount by tty_driver_kref_put().}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMihjCubh)}(h0Locking: ``tty_mutex`` protects get_tty_driver()h](h Locking: }(hjDhhhNhNubj)}(h ``tty_mutex``h]h tty_mutex}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubh protects get_tty_driver()}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMlhjCubh)}(h **Return**h]j)}(hjEh]hReturn}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMnhjCubh)}(h/driver for this inode (with increased refcount)h]h/driver for this inode (with increased refcount)}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMohjCubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_open_by_driver (C function)c.tty_open_by_driverhNtauh1jhj:hhhNhNubj)}(hhh](j)}(hHstruct tty_struct * tty_open_by_driver (dev_t device, struct file *filp)h]j)}(hFstruct tty_struct *tty_open_by_driver(dev_t device, struct file *filp)h](j)}(hjh]hstruct}(hjEEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAEhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMubj)}(h h]h }(hjSEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAEhhhjREhMubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjdEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaEubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjfEmodnameN classnameNj0j3)}j6]j9)}j,tty_open_by_driversbc.tty_open_by_driverasbuh1hhjAEhhhjREhMubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAEhhhjREhMubjM)}(hjPh]h*}(hjEhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjAEhhhjREhMubj)}(htty_open_by_driverh]j)}(hjEh]htty_open_by_driver}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubah}(h]h ](jjeh"]h$]h&]hhuh1jhjAEhhhjREhMubj)}(h!(dev_t device, struct file *filp)h](j)}(h dev_t deviceh](h)}(hhh]j)}(hdev_th]hdev_t}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjEmodnameN classnameNj0j3)}j6]jEc.tty_open_by_driverasbuh1hhjEubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubj)}(hdeviceh]hdevice}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjEubj)}(hstruct file *filph](j)}(hjh]hstruct}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubh)}(hhh]j)}(hfileh]hfile}(hj%FhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"Fubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj'FmodnameN classnameNj0j3)}j6]jEc.tty_open_by_driverasbuh1hhjFubj)}(h h]h }(hjCFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubjM)}(hjPh]h*}(hjQFhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjFubj)}(hfilph]hfilp}(hj^FhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjEubeh}(h]h ]h"]h$]h&]hhuh1jhjAEhhhjREhMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhj=EhhhjREhMubah}(h]j8Eah ](jjeh"]h$]h&]jj)jhuh1jhjREhMhj:Ehhubj)}(hhh]h)}(hopen a tty deviceh]hopen a tty device}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjFhhubah}(h]h ]h"]h$]h&]uh1jhj:EhhhjREhMubeh}(h]h ](j*functioneh"]h$]h&]jj*jjFjjFjjjuh1jhhhj:hNhNubj)}(hX**Parameters** ``dev_t device`` dev_t of device to open ``struct file *filp`` file pointer to tty **Description** Performs the driver lookup, checks for a reopen, or otherwise performs the first-time tty initialization. Claims the global tty_mutex to serialize: * concurrent first-time tty initialization * concurrent tty driver removal w/ lookup * concurrent tty removal from driver table **Return** the locked initialized or re-opened :c:type:`tty_struct`h](h)}(h**Parameters**h]j)}(hjFh]h Parameters}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjFubj)}(hhh](j)}(h)``dev_t device`` dev_t of device to open h](j)}(h``dev_t device``h]j)}(hjFh]h dev_t device}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjFubj)}(hhh]h)}(hdev_t of device to openh]hdev_t of device to open}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMhjFubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjFhMhjFubj)}(h*``struct file *filp`` file pointer to tty h](j)}(h``struct file *filp``h]j)}(hjGh]hstruct file *filp}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjFubj)}(hhh]h)}(hfile pointer to ttyh]hfile pointer to tty}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhMhjGubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjGhMhjFubeh}(h]h ]h"]h$]h&]uh1jhjFubh)}(h**Description**h]j)}(hj=Gh]h Description}(hj?GhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;Gubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjFubh)}(hiPerforms the driver lookup, checks for a reopen, or otherwise performs the first-time tty initialization.h]hiPerforms the driver lookup, checks for a reopen, or otherwise performs the first-time tty initialization.}(hjSGhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjFubj)}(hhh]j)}(hClaims the global tty_mutex to serialize: * concurrent first-time tty initialization * concurrent tty driver removal w/ lookup * concurrent tty removal from driver table h](j)}(h)Claims the global tty_mutex to serialize:h]h)Claims the global tty_mutex to serialize:}(hjiGhhhNhNubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjeGubj)}(hhh]h)}(hhh](h)}(h(concurrent first-time tty initializationh]h)}(hjGh]h(concurrent first-time tty initialization}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj~Gubah}(h]h ]h"]h$]h&]uh1hhj{Gubh)}(h'concurrent tty driver removal w/ lookuph]h)}(hjGh]h'concurrent tty driver removal w/ lookup}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjGubah}(h]h ]h"]h$]h&]uh1hhj{Gubh)}(h)concurrent tty removal from driver table h]h)}(h(concurrent tty removal from driver tableh]h(concurrent tty removal from driver table}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwGhMhjGubah}(h]h ]h"]h$]h&]uh1hhj{Gubeh}(h]h ]h"]h$]h&]jzjPuh1hhjGhMhjxGubah}(h]h ]h"]h$]h&]uh1jhjeGubeh}(h]h ]h"]h$]h&]uh1jhjwGhMhjbGubah}(h]h ]h"]h$]h&]uh1jhjFubh)}(h **Return**h]j)}(hjGh]hReturn}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjFubh)}(h8the locked initialized or re-opened :c:type:`tty_struct`h](h$the locked initialized or re-opened }(hjGhhhNhNubh)}(h:c:type:`tty_struct`h]j)}(hjHh]h tty_struct}(hjHhhhNhNubah}(h]h ](jj*c-typeeh"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]refdocj refdomainj*reftypetype refexplicitrefwarnj0jj tty_structuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjGubeh}(h]h ]h"]h$]h&]uh1hhjHhMhjFubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_open (C function) c.tty_openhNtauh1jhj:hhhNhNubj)}(hhh](j)}(h5int tty_open (struct inode *inode, struct file *filp)h]j)}(h4int tty_open(struct inode *inode, struct file *filp)h](j)}(hinth]hint}(hjDHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@Hhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM"ubj)}(h h]h }(hjSHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@HhhhjRHhM"ubj)}(htty_openh]j)}(htty_openh]htty_open}(hjeHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaHubah}(h]h ](jjeh"]h$]h&]hhuh1jhj@HhhhjRHhM"ubj)}(h((struct inode *inode, struct file *filp)h](j)}(hstruct inode *inodeh](j)}(hjh]hstruct}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}Hubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}Hubh)}(hhh]j)}(hinodeh]hinode}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjHmodnameN classnameNj0j3)}j6]j9)}j,jgHsb c.tty_openasbuh1hhj}Hubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}HubjM)}(hjPh]h*}(hjHhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj}Hubj)}(hinodeh]hinode}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}Hubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjyHubj)}(hstruct file *filph](j)}(hjh]hstruct}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj)}(h h]h }(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubh)}(hhh]j)}(hfileh]hfile}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjImodnameN classnameNj0j3)}j6]jH c.tty_openasbuh1hhjHubj)}(h h]h }(hj/IhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubjM)}(hjPh]h*}(hj=IhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjHubj)}(hfilph]hfilp}(hjJIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjyHubeh}(h]h ]h"]h$]h&]hhuh1jhj@HhhhjRHhM"ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjcount, now. - Ted 1/27/92) The termios state of a pty is reset on the first open so that settings don't persist across reuse. Locking: * ``tty_mutex`` protects tty, tty_lookup_driver() and tty_init_dev(). * **tty->count** should protect the rest. * ->siglock protects ->signal/->sighand **Note** the tty_unlock/lock cases without a ref are only safe due to ``tty_mutex``h](h)}(h**Parameters**h]j)}(hjIh]h Parameters}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM&hjIubj)}(hhh](j)}(h-``struct inode *inode`` inode of device file h](j)}(h``struct inode *inode``h]j)}(hjIh]hstruct inode *inode}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM#hjIubj)}(hhh]h)}(hinode of device fileh]hinode of device file}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhM#hjIubah}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jhjIhM#hjIubj)}(h*``struct file *filp`` file pointer to tty h](j)}(h``struct file *filp``h]j)}(hjIh]hstruct file *filp}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM$hjIubj)}(hhh]h)}(hfile pointer to ttyh]hfile pointer to tty}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhM$hjJubah}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jhjJhM$hjIubeh}(h]h ]h"]h$]h&]uh1jhjIubh)}(h**Description**h]j)}(hj)Jh]h Description}(hj+JhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'Jubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM&hjIubh)}(htty_open() and tty_release() keep up the tty count that contains the number of opens done on a tty. We cannot use the inode-count, as different inodes might point to the same tty.h]htty_open() and tty_release() keep up the tty count that contains the number of opens done on a tty. We cannot use the inode-count, as different inodes might point to the same tty.}(hj?JhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM%hjIubh)}(hOpen-counting is needed for pty masters, as well as for keeping track of serial lines: DTR is dropped when the last close happens. (This is not done solely through tty->count, now. - Ted 1/27/92)h]hOpen-counting is needed for pty masters, as well as for keeping track of serial lines: DTR is dropped when the last close happens. (This is not done solely through tty->count, now. - Ted 1/27/92)}(hjNJhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM)hjIubh)}(hbThe termios state of a pty is reset on the first open so that settings don't persist across reuse.h]hdThe termios state of a pty is reset on the first open so that settings don’t persist across reuse.}(hj]JhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM-hjIubj)}(hhh]j)}(hLocking: * ``tty_mutex`` protects tty, tty_lookup_driver() and tty_init_dev(). * **tty->count** should protect the rest. * ->siglock protects ->signal/->sighand h](j)}(hLocking:h]hLocking:}(hjsJhhhNhNubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM3hjoJubj)}(hhh]h)}(hhh](h)}(hC``tty_mutex`` protects tty, tty_lookup_driver() and tty_init_dev().h]h)}(hjJh](j)}(h ``tty_mutex``h]h tty_mutex}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubh6 protects tty, tty_lookup_driver() and tty_init_dev().}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM1hjJubah}(h]h ]h"]h$]h&]uh1hhjJubh)}(h'**tty->count** should protect the rest.h]h)}(hjJh](j)}(h**tty->count**h]h tty->count}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubh should protect the rest.}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM2hjJubah}(h]h ]h"]h$]h&]uh1hhjJubh)}(h&->siglock protects ->signal/->sighand h]h)}(h%->siglock protects ->signal/->sighandh]h%->siglock protects ->signal/->sighand}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhM3hjJubah}(h]h ]h"]h$]h&]uh1hhjJubeh}(h]h ]h"]h$]h&]jzjPuh1hhjJhM1hjJubah}(h]h ]h"]h$]h&]uh1jhjoJubeh}(h]h ]h"]h$]h&]uh1jhjJhM3hjlJubah}(h]h ]h"]h$]h&]uh1jhjIubh)}(h**Note**h]j)}(hjKh]hNote}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM5hjIubh)}(hJthe tty_unlock/lock cases without a ref are only safe due to ``tty_mutex``h](h=the tty_unlock/lock cases without a ref are only safe due to }(hjKhhhNhNubj)}(h ``tty_mutex``h]h tty_mutex}(hj$KhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM6hjIubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_poll (C function) c.tty_pollhNtauh1jhj:hhhNhNubj)}(hhh](j)}(h7__poll_t tty_poll (struct file *filp, poll_table *wait)h]j)}(h6__poll_t tty_poll(struct file *filp, poll_table *wait)h](h)}(hhh]j)}(h__poll_th]h__poll_t}(hj\KhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYKubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj^KmodnameN classnameNj0j3)}j6]j9)}j,tty_pollsb c.tty_pollasbuh1hhjUKhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMubj)}(h h]h }(hj~KhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUKhhhj}KhMubj)}(htty_pollh]j)}(hjzKh]htty_poll}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubah}(h]h ](jjeh"]h$]h&]hhuh1jhjUKhhhj}KhMubj)}(h%(struct file *filp, poll_table *wait)h](j)}(hstruct file *filph](j)}(hjh]hstruct}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubj)}(h h]h }(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubh)}(hhh]j)}(hfileh]hfile}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjKmodnameN classnameNj0j3)}j6]jxK c.tty_pollasbuh1hhjKubj)}(h h]h }(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubjM)}(hjPh]h*}(hjKhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjKubj)}(hfilph]hfilp}(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjKubj)}(hpoll_table *waith](h)}(hhh]j)}(h poll_tableh]h poll_table}(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj LmodnameN classnameNj0j3)}j6]jxK c.tty_pollasbuh1hhjLubj)}(h h]h }(hjNmodnameN classnameNj0j3)}j6]jN c.tiocstiasbuh1hhj5Nubj)}(h h]h }(hjZNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5Nubh__user}(hj5NhhhNhNubj)}(h h]h }(hjlNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5NubjM)}(hjPh]h*}(hjzNhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj5Nubj)}(hjYh]hp}(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5Nubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjMubeh}(h]h ]h"]h$]h&]hhuh1jhjMhhhjMhMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjMhhhjMhMubah}(h]j}Mah ](jjeh"]h$]h&]jj)jhuh1jhjMhMhjMhhubj)}(hhh]h)}(hfake input characterh]hfake input character}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjNhhubah}(h]h ]h"]h$]h&]uh1jhjMhhhjMhMubeh}(h]h ](j*functioneh"]h$]h&]jj*jjNjjNjjjuh1jhhhj:hNhNubj)}(hXZ**Parameters** ``struct tty_struct *tty`` tty to fake input into ``u8 __user *p`` pointer to character **Description** Fake input to a tty device. Does the necessary locking and input management. FIXME: does not honour flow control ?? Locking: * Called functions take tty_ldiscs_lock * current->signal->tty check is safe without locksh](h)}(h**Parameters**h]j)}(hjNh]h Parameters}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjNubj)}(hhh](j)}(h2``struct tty_struct *tty`` tty to fake input into h](j)}(h``struct tty_struct *tty``h]j)}(hjNh]hstruct tty_struct *tty}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjNubj)}(hhh]h)}(htty to fake input intoh]htty to fake input into}(hj OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjOubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhjOhMhjNubj)}(h&``u8 __user *p`` pointer to character h](j)}(h``u8 __user *p``h]j)}(hj*Oh]h u8 __user *p}(hj,OhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(Oubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj$Oubj)}(hhh]h)}(hpointer to characterh]hpointer to character}(hjCOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?OhMhj@Oubah}(h]h ]h"]h$]h&]uh1jhj$Oubeh}(h]h ]h"]h$]h&]uh1jhj?OhMhjNubeh}(h]h ]h"]h$]h&]uh1jhjNubh)}(h**Description**h]j)}(hjeOh]h Description}(hjgOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcOubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjNubh)}(hLFake input to a tty device. Does the necessary locking and input management.h]hLFake input to a tty device. Does the necessary locking and input management.}(hj{OhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjNubh)}(h&FIXME: does not honour flow control ??h]h&FIXME: does not honour flow control ??}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjNubj)}(hhh]j)}(hcLocking: * Called functions take tty_ldiscs_lock * current->signal->tty check is safe without locksh](j)}(hLocking:h]hLocking:}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjOubj)}(hhh]h)}(hhh](h)}(h%Called functions take tty_ldiscs_lockh]h)}(hjOh]h%Called functions take tty_ldiscs_lock}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjOubah}(h]h ]h"]h$]h&]uh1hhjOubh)}(h0current->signal->tty check is safe without locksh]h)}(hjOh]h0current->signal->tty check is safe without locks}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjOubah}(h]h ]h"]h$]h&]uh1hhjOubeh}(h]h ]h"]h$]h&]jzjPuh1hhjOhMhjOubah}(h]h ]h"]h$]h&]uh1jhjOubeh}(h]h ]h"]h$]h&]uh1jhjOhMhjOubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtiocgwinsz (C function) c.tiocgwinszhNtauh1jhj:hhhNhNubj)}(hhh](j)}(hCint tiocgwinsz (struct tty_struct *tty, struct winsize __user *arg)h]j)}(hBint tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg)h](j)}(hinth]hint}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMubj)}(h h]h }(hj+PhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPhhhj*PhMubj)}(h tiocgwinszh]j)}(h tiocgwinszh]h tiocgwinsz}(hj=PhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9Pubah}(h]h ](jjeh"]h$]h&]hhuh1jhjPhhhj*PhMubj)}(h4(struct tty_struct *tty, struct winsize __user *arg)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjYPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUPubj)}(h h]h }(hjfPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUPubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjwPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtPubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjyPmodnameN classnameNj0j3)}j6]j9)}j,j?Psb c.tiocgwinszasbuh1hhjUPubj)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUPubjM)}(hjPh]h*}(hjPhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjUPubj)}(httyh]htty}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUPubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjQPubj)}(hstruct winsize __user *argh](j)}(hjh]hstruct}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubj)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubh)}(hhh]j)}(hwinsizeh]hwinsize}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjPmodnameN classnameNj0j3)}j6]jP c.tiocgwinszasbuh1hhjPubj)}(h h]h }(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubh__user}(hjPhhhNhNubj)}(h h]h }(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubjM)}(hjPh]h*}(hj'QhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjPubj)}(hargh]harg}(hj4QhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjQPubeh}(h]h ]h"]h$]h&]hhuh1jhjPhhhj*PhMubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjPhhhj*PhMubah}(h]jPah ](jjeh"]h$]h&]jj)jhuh1jhj*PhMhjPhhubj)}(hhh]h)}(himplement window query ioctlh]himplement window query ioctl}(hj^QhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhj[Qhhubah}(h]h ]h"]h$]h&]uh1jhjPhhhj*PhMubeh}(h]h ](j*functioneh"]h$]h&]jj*jjvQjjvQjjjuh1jhhhj:hNhNubj)}(hX**Parameters** ``struct tty_struct *tty`` tty ``struct winsize __user *arg`` user buffer for result **Description** Copies the kernel idea of the window size into the user buffer. Locking: **tty->winsize_mutex** is taken to ensure the winsize data is consistent.h](h)}(h**Parameters**h]j)}(hjQh]h Parameters}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~Qubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjzQubj)}(hhh](j)}(h``struct tty_struct *tty`` tty h](j)}(h``struct tty_struct *tty``h]j)}(hjQh]hstruct tty_struct *tty}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjQubj)}(hhh]h)}(httyh]htty}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhMhjQubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]uh1jhjQhMhjQubj)}(h6``struct winsize __user *arg`` user buffer for result h](j)}(h``struct winsize __user *arg``h]j)}(hjQh]hstruct winsize __user *arg}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjQubj)}(hhh]h)}(huser buffer for resulth]huser buffer for result}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhMhjQubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]uh1jhjQhMhjQubeh}(h]h ]h"]h$]h&]uh1jhjzQubh)}(h**Description**h]j)}(hjRh]h Description}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjzQubh)}(h?Copies the kernel idea of the window size into the user buffer.h]h?Copies the kernel idea of the window size into the user buffer.}(hj)RhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjzQubh)}(hRLocking: **tty->winsize_mutex** is taken to ensure the winsize data is consistent.h](h Locking: }(hj8RhhhNhNubj)}(h**tty->winsize_mutex**h]htty->winsize_mutex}(hj@RhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8Rubh3 is taken to ensure the winsize data is consistent.}(hj8RhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMhjzQubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtiocswinsz (C function) c.tiocswinszhNtauh1jhj:hhhNhNubj)}(hhh](j)}(hCint tiocswinsz (struct tty_struct *tty, struct winsize __user *arg)h]j)}(hBint tiocswinsz(struct tty_struct *tty, struct winsize __user *arg)h](j)}(hinth]hint}(hjyRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuRhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM* ubj)}(h h]h }(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuRhhhjRhM* ubj)}(h tiocswinszh]j)}(h tiocswinszh]h tiocswinsz}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubah}(h]h ](jjeh"]h$]h&]hhuh1jhjuRhhhjRhM* ubj)}(h4(struct tty_struct *tty, struct winsize __user *arg)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubj)}(h h]h }(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjRmodnameN classnameNj0j3)}j6]j9)}j,jRsb c.tiocswinszasbuh1hhjRubj)}(h h]h }(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubjM)}(hjPh]h*}(hjShhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjRubj)}(httyh]htty}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjRubj)}(hstruct winsize __user *argh](j)}(hjh]hstruct}(hj(ShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$Subj)}(h h]h }(hj5ShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$Subh)}(hhh]j)}(hwinsizeh]hwinsize}(hjFShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCSubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjHSmodnameN classnameNj0j3)}j6]jR c.tiocswinszasbuh1hhj$Subj)}(h h]h }(hjdShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$Subh__user}(hj$ShhhNhNubj)}(h h]h }(hjvShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$SubjM)}(hjPh]h*}(hjShhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj$Subj)}(hargh]harg}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$Subeh}(h]h ]h"]h$]h&]noemphhhuh1jhjRubeh}(h]h ]h"]h$]h&]hhuh1jhjuRhhhjRhM* ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjqRhhhjRhM* ubah}(h]jlRah ](jjeh"]h$]h&]jj)jhuh1jhjRhM* hjnRhhubj)}(hhh]h)}(himplement window size set ioctlh]himplement window size set ioctl}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM* hjShhubah}(h]h ]h"]h$]h&]uh1jhjnRhhhjRhM* ubeh}(h]h ](j*functioneh"]h$]h&]jj*jjSjjSjjjuh1jhhhj:hNhNubj)}(hX**Parameters** ``struct tty_struct *tty`` tty side of tty ``struct winsize __user *arg`` user buffer for result **Description** Copies the user idea of the window size to the kernel. Traditionally this is just advisory information but for the Linux console it actually has driver level meaning and triggers a VC resize. Locking: Driver dependent. The default do_resize method takes the tty termios mutex and ctrl.lock. The console takes its own lock then calls into the default method.h](h)}(h**Parameters**h]j)}(hjSh]h Parameters}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM. hjSubj)}(hhh](j)}(h+``struct tty_struct *tty`` tty side of tty h](j)}(h``struct tty_struct *tty``h]j)}(hjSh]hstruct tty_struct *tty}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM+ hjSubj)}(hhh]h)}(htty side of ttyh]htty side of tty}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThM+ hjTubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhjThM+ hjSubj)}(h6``struct winsize __user *arg`` user buffer for result h](j)}(h``struct winsize __user *arg``h]j)}(hj5Th]hstruct winsize __user *arg}(hj7ThhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3Tubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM, hj/Tubj)}(hhh]h)}(huser buffer for resulth]huser buffer for result}(hjNThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJThM, hjKTubah}(h]h ]h"]h$]h&]uh1jhj/Tubeh}(h]h ]h"]h$]h&]uh1jhjJThM, hjSubeh}(h]h ]h"]h$]h&]uh1jhjSubh)}(h**Description**h]j)}(hjpTh]h Description}(hjrThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnTubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM. hjSubh)}(hCopies the user idea of the window size to the kernel. Traditionally this is just advisory information but for the Linux console it actually has driver level meaning and triggers a VC resize.h]hCopies the user idea of the window size to the kernel. Traditionally this is just advisory information but for the Linux console it actually has driver level meaning and triggers a VC resize.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM- hjSubj)}(hhh]j)}(hLocking: Driver dependent. The default do_resize method takes the tty termios mutex and ctrl.lock. The console takes its own lock then calls into the default method.h](j)}(hLocking:h]hLocking:}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM3 hjTubj)}(hhh]h)}(hDriver dependent. The default do_resize method takes the tty termios mutex and ctrl.lock. The console takes its own lock then calls into the default method.h]hDriver dependent. The default do_resize method takes the tty termios mutex and ctrl.lock. The console takes its own lock then calls into the default method.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM2 hjTubah}(h]h ]h"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]uh1jhjThM3 hjTubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtioccons (C function) c.tiocconshNtauh1jhj:hhhNhNubj)}(hhh](j)}(h int tioccons (struct file *file)h]j)}(hint tioccons(struct file *file)h](j)}(hinth]hint}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjThhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chME ubj)}(h h]h }(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjThhhjThME ubj)}(htiocconsh]j)}(htiocconsh]htioccons}(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj Uubah}(h]h ](jjeh"]h$]h&]hhuh1jhjThhhjThME ubj)}(h(struct file *file)h]j)}(hstruct file *fileh](j)}(hjh]hstruct}(hj,UhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(Uubj)}(h h]h }(hj9UhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(Uubh)}(hhh]j)}(hfileh]hfile}(hjJUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGUubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjLUmodnameN classnameNj0j3)}j6]j9)}j,jUsb c.tiocconsasbuh1hhj(Uubj)}(h h]h }(hjjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(UubjM)}(hjPh]h*}(hjxUhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj(Uubj)}(hfileh]hfile}(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(Uubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj$Uubah}(h]h ]h"]h$]h&]hhuh1jhjThhhjThME ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjThhhjThME ubah}(h]jTah ](jjeh"]h$]h&]jj)jhuh1jhjThME hjThhubj)}(hhh]h)}(h#allow admin to move logical consoleh]h#allow admin to move logical console}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chME hjUhhubah}(h]h ]h"]h$]h&]uh1jhjThhhjThME ubeh}(h]h ](j*functioneh"]h$]h&]jj*jjUjjUjjjuh1jhhhj:hNhNubj)}(h**Parameters** ``struct file *file`` the file to become console **Description** Allow the administrator to move the redirected console device. Locking: uses redirect_lock to guard the redirect informationh](h)}(h**Parameters**h]j)}(hjUh]h Parameters}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMI hjUubj)}(hhh]j)}(h1``struct file *file`` the file to become console h](j)}(h``struct file *file``h]j)}(hjUh]hstruct file *file}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMF hjUubj)}(hhh]h)}(hthe file to become consoleh]hthe file to become console}(hj VhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMF hjVubah}(h]h ]h"]h$]h&]uh1jhjUubeh}(h]h ]h"]h$]h&]uh1jhjVhMF hjUubah}(h]h ]h"]h$]h&]uh1jhjUubh)}(h**Description**h]j)}(hj+Vh]h Description}(hj-VhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)Vubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMH hjUubh)}(h>Allow the administrator to move the redirected console device.h]h>Allow the administrator to move the redirected console device.}(hjAVhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMG hjUubh)}(h=Locking: uses redirect_lock to guard the redirect informationh]h=Locking: uses redirect_lock to guard the redirect information}(hjPVhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMI hjUubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtiocsetd (C function) c.tiocsetdhNtauh1jhj:hhhNhNubj)}(hhh](j)}(h4int tiocsetd (struct tty_struct *tty, int __user *p)h]j)}(h3int tiocsetd(struct tty_struct *tty, int __user *p)h](j)}(hinth]hint}(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{Vhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chMm ubj)}(h h]h }(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{VhhhjVhMm ubj)}(htiocsetdh]j)}(htiocsetdh]htiocsetd}(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubah}(h]h ](jjeh"]h$]h&]hhuh1jhj{VhhhjVhMm ubj)}(h'(struct tty_struct *tty, int __user *p)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubj)}(h h]h }(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjVmodnameN classnameNj0j3)}j6]j9)}j,jVsb c.tiocsetdasbuh1hhjVubj)}(h h]h }(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubjM)}(hjPh]h*}(hjWhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjVubj)}(httyh]htty}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjVubj)}(h int __user *ph](j)}(hinth]hint}(hj.WhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*Wubj)}(h h]h }(hjZubah}(h]h ]h"]h$]h&]uh1jhj"Zubeh}(h]h ]h"]h$]h&]uh1jhj=ZhM hjYubeh}(h]h ]h"]h$]h&]uh1jhjYubh)}(h**Description**h]j)}(hjcZh]h Description}(hjeZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaZubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjYubh)}(h9Retrieves the line discipline id directly from the ldisc.h]h9Retrieves the line discipline id directly from the ldisc.}(hjyZhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjYubh)}(hkLocking: waits for ldisc reference (in case the line discipline is changing or the **tty** is being hungup)h](hSLocking: waits for ldisc reference (in case the line discipline is changing or the }(hjZhhhNhNubj)}(h**tty**h]htty}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh is being hungup)}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjYubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsend_break (C function) c.send_breakhNtauh1jhj:hhhNhNubj)}(hhh](j)}(h>int send_break (struct tty_struct *tty, unsigned int duration)h]j)}(h=int send_break(struct tty_struct *tty, unsigned int duration)h](j)}(hinth]hint}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZhhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM ubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZhhhjZhM ubj)}(h send_breakh]j)}(h send_breakh]h send_break}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubah}(h]h ](jjeh"]h$]h&]hhuh1jhjZhhhjZhM ubj)}(h/(struct tty_struct *tty, unsigned int duration)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj$[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj![ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj&[modnameN classnameNj0j3)}j6]j9)}j,jZsb c.send_breakasbuh1hhj[ubj)}(h h]h }(hjD[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubjM)}(hjPh]h*}(hjR[hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj[ubj)}(httyh]htty}(hj_[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjZubj)}(hunsigned int durationh](j)}(hunsignedh]hunsigned}(hjx[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt[ubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt[ubj)}(hinth]hint}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt[ubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt[ubj)}(hdurationh]hduration}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt[ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjZubeh}(h]h ]h"]h$]h&]hhuh1jhjZhhhjZhM ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjZhhhjZhM ubah}(h]jZah ](jjeh"]h$]h&]jj)jhuh1jhjZhM hjZhhubj)}(hhh]h)}(hperformed time breakh]hperformed time break}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj[hhubah}(h]h ]h"]h$]h&]uh1jhjZhhhjZhM ubeh}(h]h ](j*functioneh"]h$]h&]jj*jj[jj[jjjuh1jhhhj:hNhNubj)}(hX**Parameters** ``struct tty_struct *tty`` device to break on ``unsigned int duration`` timeout in mS **Description** Perform a timed break on hardware that lacks its own driver level timed break functionality. Locking: **tty->atomic_write_lock** serializesh](h)}(h**Parameters**h]j)}(hj[h]h Parameters}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj[ubj)}(hhh](j)}(h.``struct tty_struct *tty`` device to break on h](j)}(h``struct tty_struct *tty``h]j)}(hj\h]hstruct tty_struct *tty}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj\ubj)}(hhh]h)}(hdevice to break onh]hdevice to break on}(hj4\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0\hM hj1\ubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhj0\hM hj\ubj)}(h(``unsigned int duration`` timeout in mS h](j)}(h``unsigned int duration``h]j)}(hjT\h]hunsigned int duration}(hjV\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjR\ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjN\ubj)}(hhh]h)}(h timeout in mSh]h timeout in mS}(hjm\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji\hM hjj\ubah}(h]h ]h"]h$]h&]uh1jhjN\ubeh}(h]h ]h"]h$]h&]uh1jhji\hM hj\ubeh}(h]h ]h"]h$]h&]uh1jhj[ubh)}(h**Description**h]j)}(hj\h]h Description}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj[ubh)}(h\Perform a timed break on hardware that lacks its own driver level timed break functionality.h]h\Perform a timed break on hardware that lacks its own driver level timed break functionality.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj[ubj)}(hhh]j)}(h.Locking: **tty->atomic_write_lock** serializesh](j)}(hLocking:h]hLocking:}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj\ubj)}(hhh]h)}(h%**tty->atomic_write_lock** serializesh](j)}(h**tty->atomic_write_lock**h]htty->atomic_write_lock}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh serializes}(hj\hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj\ubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhj\hM hj\ubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_tiocmget (C function)c.tty_tiocmgethNtauh1jhj:hhhNhNubj)}(hhh](j)}(h8int tty_tiocmget (struct tty_struct *tty, int __user *p)h]j)}(h7int tty_tiocmget(struct tty_struct *tty, int __user *p)h](j)}(hinth]hint}(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM ubj)}(h h]h }(hj+]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]hhhj*]hM ubj)}(h tty_tiocmgeth]j)}(h tty_tiocmgeth]h tty_tiocmget}(hj=]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9]ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj]hhhj*]hM ubj)}(h'(struct tty_struct *tty, int __user *p)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjY]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU]ubj)}(h h]h }(hjf]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU]ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjw]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt]ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjy]modnameN classnameNj0j3)}j6]j9)}j,j?]sbc.tty_tiocmgetasbuh1hhjU]ubj)}(h h]h }(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU]ubjM)}(hjPh]h*}(hj]hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjU]ubj)}(httyh]htty}(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU]ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjQ]ubj)}(h int __user *ph](j)}(hinth]hint}(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubj)}(h h]h }(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubh__user}(hj]hhhNhNubj)}(h h]h }(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubjM)}(hjPh]h*}(hj]hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj]ubj)}(hjYh]hp}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjQ]ubeh}(h]h ]h"]h$]h&]hhuh1jhj]hhhj*]hM ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhj]hhhj*]hM ubah}(h]j]ah ](jjeh"]h$]h&]jj)jhuh1jhj*]hM hj]hhubj)}(hhh]h)}(hget modem statush]hget modem status}(hj/^hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj,^hhubah}(h]h ]h"]h$]h&]uh1jhj]hhhj*]hM ubeh}(h]h ](j*functioneh"]h$]h&]jj*jjG^jjG^jjjuh1jhhhj:hNhNubj)}(hX **Parameters** ``struct tty_struct *tty`` tty device ``int __user *p`` pointer to result **Description** Obtain the modem status bits from the tty driver if the feature is supported. Return -``ENOTTY`` if it is not available. Locking: none (up to the driver)h](h)}(h**Parameters**h]j)}(hjQ^h]h Parameters}(hjS^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjO^ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjK^ubj)}(hhh](j)}(h&``struct tty_struct *tty`` tty device h](j)}(h``struct tty_struct *tty``h]j)}(hjp^h]hstruct tty_struct *tty}(hjr^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjn^ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjj^ubj)}(hhh]h)}(h tty deviceh]h tty device}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hM hj^ubah}(h]h ]h"]h$]h&]uh1jhjj^ubeh}(h]h ]h"]h$]h&]uh1jhj^hM hjg^ubj)}(h$``int __user *p`` pointer to result h](j)}(h``int __user *p``h]j)}(hj^h]h int __user *p}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj^ubj)}(hhh]h)}(hpointer to resulth]hpointer to result}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hM hj^ubah}(h]h ]h"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]uh1jhj^hM hjg^ubeh}(h]h ]h"]h$]h&]uh1jhjK^ubh)}(h**Description**h]j)}(hj^h]h Description}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjK^ubh)}(hxObtain the modem status bits from the tty driver if the feature is supported. Return -``ENOTTY`` if it is not available.h](hVObtain the modem status bits from the tty driver if the feature is supported. Return -}(hj^hhhNhNubj)}(h ``ENOTTY``h]hENOTTY}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubh if it is not available.}(hj^hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjK^ubh)}(h Locking: none (up to the driver)h]h Locking: none (up to the driver)}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjK^ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jtty_tiocmset (C function)c.tty_tiocmsethNtauh1jhj:hhhNhNubj)}(hhh](j)}(hOint tty_tiocmset (struct tty_struct *tty, unsigned int cmd, unsigned __user *p)h]j)}(hNint tty_tiocmset(struct tty_struct *tty, unsigned int cmd, unsigned __user *p)h](j)}(hinth]hint}(hjJ_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF_hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM ubj)}(h h]h }(hjY_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF_hhhjX_hM ubj)}(h tty_tiocmseth]j)}(h tty_tiocmseth]h tty_tiocmset}(hjk_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjg_ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjF_hhhjX_hM ubj)}(h>(struct tty_struct *tty, unsigned int cmd, unsigned __user *p)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(h h]h }(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj_modnameN classnameNj0j3)}j6]j9)}j,jm_sbc.tty_tiocmsetasbuh1hhj_ubj)}(h h]h }(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubjM)}(hjPh]h*}(hj_hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj_ubj)}(httyh]htty}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj_ubj)}(hunsigned int cmdh](j)}(hunsignedh]hunsigned}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(hinth]hint}(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(h h]h }(hj#`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(hcmdh]hcmd}(hj1`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj_ubj)}(hunsigned __user *ph](j)}(hunsignedh]hunsigned}(hjJ`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF`ubj)}(h h]h }(hjX`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF`ubh__user}(hjF`hhhNhNubj)}(h h]h }(hjj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF`ubjM)}(hjPh]h*}(hjx`hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjF`ubj)}(hjYh]hp}(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF`ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj_ubeh}(h]h ]h"]h$]h&]hhuh1jhjF_hhhjX_hM ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjB_hhhjX_hM ubah}(h]j=_ah ](jjeh"]h$]h&]jj)jhuh1jhjX_hM hj?_hhubj)}(hhh]h)}(hset modem statush]hset modem status}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj`hhubah}(h]h ]h"]h$]h&]uh1jhj?_hhhjX_hM ubeh}(h]h ](j*functioneh"]h$]h&]jj*jj`jj`jjjuh1jhhhj:hNhNubj)}(hXU**Parameters** ``struct tty_struct *tty`` tty device ``unsigned int cmd`` command - clear bits, set bits or set all ``unsigned __user *p`` pointer to desired bits **Description** Set the modem status bits from the tty driver if the feature is supported. Return -``ENOTTY`` if it is not available. Locking: none (up to the driver)h](h)}(h**Parameters**h]j)}(hj`h]h Parameters}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj`ubj)}(hhh](j)}(h&``struct tty_struct *tty`` tty device h](j)}(h``struct tty_struct *tty``h]j)}(hj`h]hstruct tty_struct *tty}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj`ubj)}(hhh]h)}(h tty deviceh]h tty device}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahM hjaubah}(h]h ]h"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]uh1jhjahM hj`ubj)}(h?``unsigned int cmd`` command - clear bits, set bits or set all h](j)}(h``unsigned int cmd``h]j)}(hj(ah]hunsigned int cmd}(hj*ahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&aubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj"aubj)}(hhh]h)}(h)command - clear bits, set bits or set allh]h)command - clear bits, set bits or set all}(hjAahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=ahM hj>aubah}(h]h ]h"]h$]h&]uh1jhj"aubeh}(h]h ]h"]h$]h&]uh1jhj=ahM hj`ubj)}(h/``unsigned __user *p`` pointer to desired bits h](j)}(h``unsigned __user *p``h]j)}(hjaah]hunsigned __user *p}(hjcahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_aubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj[aubj)}(hhh]h)}(hpointer to desired bitsh]hpointer to desired bits}(hjzahhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvahM hjwaubah}(h]h ]h"]h$]h&]uh1jhj[aubeh}(h]h ]h"]h$]h&]uh1jhjvahM hj`ubeh}(h]h ]h"]h$]h&]uh1jhj`ubh)}(h**Description**h]j)}(hjah]h Description}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj`ubh)}(huSet the modem status bits from the tty driver if the feature is supported. Return -``ENOTTY`` if it is not available.h](hSSet the modem status bits from the tty driver if the feature is supported. Return -}(hjahhhNhNubj)}(h ``ENOTTY``h]hENOTTY}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh if it is not available.}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj`ubh)}(h Locking: none (up to the driver)h]h Locking: none (up to the driver)}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj`ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jalloc_tty_struct (C function)c.alloc_tty_structhNtauh1jhj:hhhNhNubj)}(hhh](j)}(hIstruct tty_struct * alloc_tty_struct (struct tty_driver *driver, int idx)h]j)}(hGstruct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)h](j)}(hjh]hstruct}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjahhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM ubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjahhhjbhM ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj!bhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetj#bmodnameN classnameNj0j3)}j6]j9)}j,alloc_tty_structsbc.alloc_tty_structasbuh1hhjahhhjbhM ubj)}(h h]h }(hjBbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjahhhjbhM ubjM)}(hjPh]h*}(hjPbhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjahhhjbhM ubj)}(halloc_tty_structh]j)}(hj?bh]halloc_tty_struct}(hjabhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]bubah}(h]h ](jjeh"]h$]h&]hhuh1jhjahhhjbhM ubj)}(h$(struct tty_driver *driver, int idx)h](j)}(hstruct tty_driver *driverh](j)}(hjh]hstruct}(hj|bhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxbubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxbubh)}(hhh]j)}(h tty_driverh]h tty_driver}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&] refdomainj*reftypej, reftargetjbmodnameN classnameNj0j3)}j6]j=bc.alloc_tty_structasbuh1hhjxbubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxbubjM)}(hjPh]h*}(hjbhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjxbubj)}(hdriverh]hdriver}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxbubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjtbubj)}(hint idxh](j)}(hinth]hint}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubj)}(hidxh]hidx}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjtbubeh}(h]h ]h"]h$]h&]hhuh1jhjahhhjbhM ubeh}(h]h ]h"]h$]h&]hhj~uh1jjjhjahhhjbhM ubah}(h]jaah ](jjeh"]h$]h&]jj)jhuh1jhjbhM hjahhubj)}(hhh]h)}(hallocate a new ttyh]hallocate a new tty}(hj2chhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hj/chhubah}(h]h ]h"]h$]h&]uh1jhjahhhjbhM ubeh}(h]h ](j*functioneh"]h$]h&]jj*jjJcjjJcjjjuh1jhhhj:hNhNubj)}(hX**Parameters** ``struct tty_driver *driver`` driver which will handle the returned tty ``int idx`` minor of the tty **Description** This subroutine allocates and initializes a tty structure. Locking: none - **tty** in question is not exposed at this pointh](h)}(h**Parameters**h]j)}(hjTch]h Parameters}(hjVchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRcubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjNcubj)}(hhh](j)}(hH``struct tty_driver *driver`` driver which will handle the returned tty h](j)}(h``struct tty_driver *driver``h]j)}(hjsch]hstruct tty_driver *driver}(hjuchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqcubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjmcubj)}(hhh]h)}(h)driver which will handle the returned ttyh]h)driver which will handle the returned tty}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchM hjcubah}(h]h ]h"]h$]h&]uh1jhjmcubeh}(h]h ]h"]h$]h&]uh1jhjchM hjjcubj)}(h``int idx`` minor of the tty h](j)}(h ``int idx``h]j)}(hjch]hint idx}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjcubj)}(hhh]h)}(hminor of the ttyh]hminor of the tty}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchM hjcubah}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1jhjchM hjjcubeh}(h]h ]h"]h$]h&]uh1jhjNcubh)}(h**Description**h]j)}(hjch]h Description}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjNcubh)}(h:This subroutine allocates and initializes a tty structure.h]h:This subroutine allocates and initializes a tty structure.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjNcubh)}(h@Locking: none - **tty** in question is not exposed at this pointh](hLocking: none - }(hj dhhhNhNubj)}(h**tty**h]htty}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj dubh) in question is not exposed at this point}(hj dhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_internals:30: ./drivers/tty/tty_io.chM hjNcubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj:hhhNhNubeh}(h]jFah ]h"]internal functionsah$]h&]uh1hhhhhhhhKubeh}(h] tty-internalsah ]h"] tty internalsah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjfderror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j@dj=dj`j[jjj-j$j8djFu nametypes}(j@dj`jj-j8duh}(j=dhj[hjjcjjj}jjjj$jjjj j j j jFj:jWj\jjjhjmjjjBjGjFjKjnjsjjjjjjj"j"j($j-$j&j&js)jx)j,j,j.j.j1j1j2j2ju5jz5j7j 7j8j8j ;j;j =j%=j?j?j&Bj+Bj8Ej=Ej7Hj