asphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget,/translations/zh_CN/driver-api/tty/tty_ldiscmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/zh_TW/driver-api/tty/tty_ldiscmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/it_IT/driver-api/tty/tty_ldiscmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ja_JP/driver-api/tty/tty_ldiscmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ko_KR/driver-api/tty/tty_ldiscmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/sp_SP/driver-api/tty/tty_ldiscmodnameN 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:spacepreserveuh1hhhhhhF/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc.rsthKubhsection)}(hhh](htitle)}(hTTY Line Disciplineh]hTTY Line Discipline}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhtopic)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh]h paragraph)}(hhh]h reference)}(hhh]h Registration}(hhhhhNhNubah}(h]id1ah ]h"]h$]h&]refid registrationuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hOther Functions}(hjhhhNhNubah}(h]id2ah ]h"]h$]h&]refidother-functionsuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]h$Line Discipline Operations Reference}(hj#hhhNhNubah}(h]id3ah ]h"]h$]h&]refid$line-discipline-operations-referenceuh1hhj ubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]h Driver Access}(hjEhhhNhNubah}(h]id4ah ]h"]h$]h&]refid driver-accessuh1hhjBubah}(h]h ]h"]h$]h&]uh1hhj?ubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]h TTY Flags}(hjghhhNhNubah}(h]id5ah ]h"]h$]h&]refid tty-flagsuh1hhjdubah}(h]h ]h"]h$]h&]uh1hhjaubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hLocking}(hjhhhNhNubah}(h]id6ah ]h"]h$]h&]refidlockinguh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]hInternal Functions}(hjhhhNhNubah}(h]id7ah ]h"]h$]h&]refidinternal-functionsuh1hhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhNhNubah}(h]contentsah ](contentslocaleh"]contentsah$]h&]uh1hhhhKhhhhubh)}(hXQTTY line discipline process all incoming and outgoing character from/to a tty device. The default line discipline is :doc:`N_TTY `. It is also a fallback if establishing any other discipline for a tty fails. If even N_TTY fails, N_NULL takes over. That never fails, but also does not process any characters -- it throws them away.h](huTTY line discipline process all incoming and outgoing character from/to a tty device. The default line discipline is }(hjhhhNhNubh)}(h:doc:`N_TTY `h]hinline)}(hjh]hN_TTY}(hjhhhNhNubah}(h]h ](xrefstdstd-doceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocdriver-api/tty/tty_ldisc refdomainjreftypedoc refexplicitrefwarn reftargetn_ttyuh1hhhhK hjubh. It is also a fallback if establishing any other discipline for a tty fails. If even N_TTY fails, N_NULL takes over. That never fails, but also does not process any characters -- it throws them away.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(h Registrationh]h Registration}(hjhhhNhNubah}(h]h ]h"]h$]h&]refidhuh1hhjhhhhhKubh)}(hXiLine disciplines are registered with tty_register_ldisc() passing the ldisc structure. At the point of registration the discipline must be ready to use and it is possible it will get used before the call returns success. If the call returns an error then it won’t get called. Do not re-use ldisc numbers as they are part of the userspace ABI and writing over an existing ldisc will cause demons to eat your computer. You must not re-register over the top of the line discipline even with the same data or your computer again will be eaten by demons. In order to remove a line discipline call tty_unregister_ldisc().h]hXiLine disciplines are registered with tty_register_ldisc() passing the ldisc structure. At the point of registration the discipline must be ready to use and it is possible it will get used before the call returns success. If the call returns an error then it won’t get called. Do not re-use ldisc numbers as they are part of the userspace ABI and writing over an existing ldisc will cause demons to eat your computer. You must not re-register over the top of the line discipline even with the same data or your computer again will be eaten by demons. In order to remove a line discipline call tty_unregister_ldisc().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXHeed this warning: the reference count field of the registered copies of the tty_ldisc structure in the ldisc table counts the number of lines using this discipline. The reference count of the tty_ldisc structure within a tty counts the number of active users of the ldisc at this instant. In effect it counts the number of threads of execution within an ldisc method (plus those about to enter and exit although this detail matters not).h]hXHeed this warning: the reference count field of the registered copies of the tty_ldisc structure in the ldisc table counts the number of lines using this discipline. The reference count of the tty_ldisc structure within a tty counts the number of active users of the ldisc at this instant. In effect it counts the number of threads of execution within an ldisc method (plus those about to enter and exit although this detail matters not).}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singletty_register_ldisc (C function)c.tty_register_ldischNtauh1j<hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h8int tty_register_ldisc (struct tty_ldisc_ops *new_ldisc)h]hdesc_signature_line)}(h7int tty_register_ldisc(struct tty_ldisc_ops *new_ldisc)h](hdesc_sig_keyword_type)}(hinth]hint}(hj`hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j^hjZhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK:ubhdesc_sig_space)}(h h]h }(hjrhhhNhNubah}(h]h ]wah"]h$]h&]uh1jphjZhhhjohK:ubh desc_name)}(htty_register_ldisch]h desc_sig_name)}(htty_register_ldisch]htty_register_ldisc}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjZhhhjohK:ubhdesc_parameterlist)}(h!(struct tty_ldisc_ops *new_ldisc)h]hdesc_parameter)}(hstruct tty_ldisc_ops *new_ldisch](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubh)}(hhh]j)}(h tty_ldisc_opsh]h tty_ldisc_ops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jjsbc.tty_register_ldiscasbuh1hhjubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjubj)}(h new_ldisch]h new_ldisc}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjZhhhjohK:ubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jXsphinx_line_type declaratorhjThhhjohK:ubah}(h]jKah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jRhjohK:hjOhhubh desc_content)}(hhh]h)}(hinstall a line disciplineh]hinstall a line discipline}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK2hjGhhubah}(h]h ]h"]h$]h&]uh1jEhjOhhhjohK:ubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejbdesctypejbnoindex noindexentrynocontentsentryuh1jMhhhjhNhNubh container)}(hX<**Parameters** ``struct tty_ldisc_ops *new_ldisc`` pointer to the ldisc object **Description** Installs a new line discipline into the kernel. The discipline is set up as unreferenced and then made available to the kernel from this point onwards. Locking: takes ``tty_ldiscs_lock`` to guard against ldisc racesh](h)}(h**Parameters**h]hstrong)}(hjth]h Parameters}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjrubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK6hjnubhdefinition_list)}(hhh]hdefinition_list_item)}(h@``struct tty_ldisc_ops *new_ldisc`` pointer to the ldisc object h](hterm)}(h#``struct tty_ldisc_ops *new_ldisc``h]hliteral)}(hjh]hstruct tty_ldisc_ops *new_ldisc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK3hjubh definition)}(hhh]h)}(hpointer to the ldisc objecth]hpointer to the ldisc object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK3hjubah}(h]h ]h"]h$]h&]uh1jhjnubh)}(h**Description**h]jw)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK5hjnubh)}(hInstalls a new line discipline into the kernel. The discipline is set up as unreferenced and then made available to the kernel from this point onwards.h]hInstalls a new line discipline into the kernel. The discipline is set up as unreferenced and then made available to the kernel from this point onwards.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK5hjnubh)}(h?Locking: takes ``tty_ldiscs_lock`` to guard against ldisc racesh](hLocking: takes }(hjhhhNhNubj)}(h``tty_ldiscs_lock``h]htty_ldiscs_lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to guard against ldisc races}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chK8hjnubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jI!tty_unregister_ldisc (C function)c.tty_unregister_ldischNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h7void tty_unregister_ldisc (struct tty_ldisc_ops *ldisc)h]jY)}(h6void tty_unregister_ldisc(struct tty_ldisc_ops *ldisc)h](j_)}(hvoidh]hvoid}(hj@hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj<hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chKRubjq)}(h h]h }(hjOhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj<hhhjNhKRubj)}(htty_unregister_ldisch]j)}(htty_unregister_ldisch]htty_unregister_ldisc}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj<hhhjNhKRubj)}(h(struct tty_ldisc_ops *ldisc)h]j)}(hstruct tty_ldisc_ops *ldisch](j)}(hjh]hstruct}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjyubh)}(hhh]j)}(h tty_ldisc_opsh]h tty_ldisc_ops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjcsbc.tty_unregister_ldiscasbuh1hhjyubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjyubj)}(hj h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubj)}(hldisch]hldisc}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjuubah}(h]h ]h"]h$]h&]hhuh1jhj<hhhjNhKRubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hj8hhhjNhKRubah}(h]j3ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhjNhKRhj5hhubjF)}(hhh]h)}(hunload a line disciplineh]hunload a line discipline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chKJhjhhubah}(h]h ]h"]h$]h&]uh1jEhj5hhhjNhKRubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgjjhjjijjjkuh1jMhhhjhNhNubjm)}(h**Parameters** ``struct tty_ldisc_ops *ldisc`` ldisc number **Description** Remove a line discipline from the kernel providing it is not currently in use. Locking: takes ``tty_ldiscs_lock`` to guard against ldisc racesh](h)}(h**Parameters**h]jw)}(hj"h]h Parameters}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chKNhjubj)}(hhh]j)}(h-``struct tty_ldisc_ops *ldisc`` ldisc number h](j)}(h``struct tty_ldisc_ops *ldisc``h]j)}(hjAh]hstruct tty_ldisc_ops *ldisc}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chKKhj;ubj)}(hhh]h)}(h ldisc numberh]h ldisc number}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhKKhjWubah}(h]h ]h"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]uh1jhjVhKKhj8ubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jw)}(hj|h]h Description}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjzubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chKMhjubh)}(hNRemove a line discipline from the kernel providing it is not currently in use.h]hNRemove a line discipline from the kernel providing it is not currently in use.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chKMhjubh)}(h?Locking: takes ``tty_ldiscs_lock`` to guard against ldisc racesh](hLocking: takes }(hjhhhNhNubj)}(h``tty_ldiscs_lock``h]htty_ldiscs_lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to guard against ldisc races}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:34: ./drivers/tty/tty_ldisc.chKPhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubeh}(h]hah ]h"] registrationah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hOther Functionsh]hOther Functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]jj uh1hhjhhhhhK&ubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_flush (C function)c.tty_ldisc_flushhNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h-void tty_ldisc_flush (struct tty_struct *tty)h]jY)}(h,void tty_ldisc_flush(struct tty_struct *tty)h](j_)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hj hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjhhhjhMubj)}(htty_ldisc_flushh]j)}(htty_ldisc_flushh]htty_ldisc_flush}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubjq)}(h h]h }(hjDhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj3ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjWmodnameN classnameNjj)}j]j)}jjsbc.tty_ldisc_flushasbuh1hhj3ubjq)}(h h]h }(hjuhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj3ubj)}(hj h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(httyh]htty}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj/ubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hjhhhjhMubah}(h]jah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhjhMhjhhubjF)}(hhh]h)}(hflush line discipline queueh]hflush line discipline queue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chMzhjhhubah}(h]h ]h"]h$]h&]uh1jEhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgjjhjjijjjkuh1jMhhhjhNhNubjm)}(h**Parameters** ``struct tty_struct *tty`` tty to flush ldisc for **Description** Flush the line discipline queue (if any) and the tty flip buffers for this **tty**.h](h)}(h**Parameters**h]jw)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chM~hjubj)}(hhh]j)}(h2``struct tty_struct *tty`` tty to flush ldisc for 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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chM{hjubj)}(hhh]h)}(htty to flush ldisc forh]htty to flush ldisc for}(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]jw)}(hj6h]h Description}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj4ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chM}hjubh)}(hSFlush the line discipline queue (if any) and the tty flip buffers for this **tty**.h](hKFlush the line discipline queue (if any) and the tty flip buffers for this }(hjLhhhNhNubjw)}(h**tty**h]htty}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjLubh.}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chM}hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_set_ldisc (C function)c.tty_set_ldischNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h4int tty_set_ldisc (struct tty_struct *tty, int disc)h]jY)}(h3int tty_set_ldisc(struct tty_struct *tty, int disc)h](j_)}(hinth]hint}(hjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjhhhjhMubj)}(h tty_set_ldisch]j)}(h tty_set_ldisch]h tty_set_ldisc}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMubj)}(h"(struct tty_struct *tty, int disc)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.tty_set_ldiscasbuh1hhjubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hj h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(httyh]htty}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hint disch](j_)}(hinth]hint}(hj<hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj8ubjq)}(h h]h }(hjJhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj8ubj)}(hdisch]hdisc}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hjhhhjhMubah}(h]jah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhjhMhjhhubjF)}(hhh]h)}(hset line disciplineh]hset line discipline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chMhjhhubah}(h]h ]h"]h$]h&]uh1jEhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgjjhjjijjjkuh1jMhhhjhNhNubjm)}(hX**Parameters** ``struct tty_struct *tty`` the terminal to set ``int disc`` the line discipline number **Description** Set the discipline of a tty line. Must be called from a process context. The ldisc change logic has to protect itself against any overlapping ldisc change (including on the other end of pty pairs), the close of one side of a tty/pty pair, and eventually hangup.h](h)}(h**Parameters**h]jw)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chMhjubj)}(hhh](j)}(h/``struct tty_struct *tty`` the terminal to set 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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chMhjubj)}(hhh]h)}(hthe terminal to seth]hthe terminal to set}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h(``int disc`` the line discipline number h](j)}(h ``int disc``h]j)}(hjh]hint disc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chMhjubj)}(hhh]h)}(hthe line discipline numberh]hthe line discipline number}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jw)}(hj7 h]h Description}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj5 ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chMhjubh)}(hXSet the discipline of a tty line. Must be called from a process context. The ldisc change logic has to protect itself against any overlapping ldisc change (including on the other end of pty pairs), the close of one side of a tty/pty pair, and eventually hangup.h]hXSet the discipline of a tty line. Must be called from a process context. The ldisc change logic has to protect itself against any overlapping ldisc change (including on the other end of pty pairs), the close of one side of a tty/pty pair, and eventually hangup.}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:40: ./drivers/tty/tty_ldisc.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubeh}(h]jah ]h"]other functionsah$]h&]uh1hhhhhhhhK&ubh)}(hhh](h)}(h$Line Discipline Operations Referenceh]h$Line Discipline Operations Reference}(hjm hhhNhNubah}(h]h ]h"]h$]h&]jj,uh1hhjj hhhhhK,ubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_ops (C struct)c.tty_ldisc_opshNtauh1j<hjj hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhNubjN)}(hhh](jS)}(h tty_ldisc_opsh]jY)}(hstruct tty_ldisc_opsh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKubjq)}(h h]h }(hj hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj hhhj hKubj)}(h tty_ldisc_opsh]j)}(hj h]h tty_ldisc_ops}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hj hhhj hKubah}(h]j ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhj hKhj hhubjF)}(hhh]h)}(hldisc operationsh]hldisc operations}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK:hj hhubah}(h]h ]h"]h$]h&]uh1jEhj hhhj hKubeh}(h]h ](jstructeh"]h$]h&]jfjjgj jhj jijjjkuh1jMhhhjj hj hNubjm)}(hX**Definition**:: struct tty_ldisc_ops { char *name; int num; int (*open)(struct tty_struct *tty); void (*close)(struct tty_struct *tty); void (*flush_buffer)(struct tty_struct *tty); ssize_t (*read)(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr, void **cookie, unsigned long offset); ssize_t (*write)(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr); int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); int (*compat_ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, const struct ktermios *old); __poll_t (*poll)(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait); void (*hangup)(struct tty_struct *tty); void (*receive_buf)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); void (*write_wakeup)(struct tty_struct *tty); void (*dcd_change)(struct tty_struct *tty, bool active); size_t (*receive_buf2)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); void (*lookahead_buf)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); struct module *owner; }; **Members** ``name`` name of this ldisc rendered in /proc/tty/ldiscs ``num`` ``N_*`` number (``N_TTY``, ``N_HDLC``, ...) reserved to this ldisc ``open`` [TTY] ``int ()(struct tty_struct *tty)`` This function is called when the line discipline is associated with the **tty**. No other call into the line discipline for this tty will occur until it completes successfully. It should initialize any state needed by the ldisc, and set **tty->receive_room** to the maximum amount of data the line discipline is willing to accept from the driver with a single call to **receive_buf\(\)**. Returning an error will prevent the ldisc from being attached. Optional. Can sleep. ``close`` [TTY] ``void ()(struct tty_struct *tty)`` This function is called when the line discipline is being shutdown, either because the **tty** is being closed or because the **tty** is being changed to use a new line discipline. At the point of execution no further users will enter the ldisc code for this tty. Optional. Can sleep. ``flush_buffer`` [TTY] ``void ()(struct tty_struct *tty)`` This function instructs the line discipline to clear its buffers of any input characters it may have queued to be delivered to the user mode process. It may be called at any point between open and close. Optional. ``read`` [TTY] ``ssize_t ()(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr)`` This function is called when the user requests to read from the **tty**. The line discipline will return whatever characters it has buffered up for the user. If this function is not defined, the user will receive an ``EIO`` error. Multiple read calls may occur in parallel and the ldisc must deal with serialization issues. Optional: ``EIO`` unless provided. Can sleep. ``write`` [TTY] ``ssize_t ()(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr)`` This function is called when the user requests to write to the **tty**. The line discipline will deliver the characters to the low-level tty device for transmission, optionally performing some processing on the characters first. If this function is not defined, the user will receive an ``EIO`` error. Optional: ``EIO`` unless provided. Can sleep. ``ioctl`` [TTY] ``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)`` This function is called when the user requests an ioctl which is not handled by the tty layer or the low-level tty driver. It is intended for ioctls which affect line discpline operation. Note that the search order for ioctls is (1) tty layer, (2) tty low-level driver, (3) line discpline. So a low-level driver can "grab" an ioctl request before the line discpline has a chance to see it. Optional. ``compat_ioctl`` [TTY] ``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)`` Process ioctl calls from 32-bit process on 64-bit system. Note that only ioctls that are neither "pointer to compatible structure" nor tty-generic. Something private that takes an integer or a pointer to wordsize-sensitive structure belongs here, but most of ldiscs will happily leave it ``NULL``. Optional. ``set_termios`` [TTY] ``void ()(struct tty_struct *tty, const struct ktermios *old)`` This function notifies the line discpline that a change has been made to the termios structure. Optional. ``poll`` [TTY] ``int ()(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait)`` This function is called when a user attempts to select/poll on a **tty** device. It is solely the responsibility of the line discipline to handle poll requests. Optional. ``hangup`` [TTY] ``void ()(struct tty_struct *tty)`` Called on a hangup. Tells the discipline that it should cease I/O to the tty driver. The driver should seek to perform this action quickly but should wait until any pending driver I/O is completed. No further calls into the ldisc code will occur. Optional. Can sleep. ``receive_buf`` [DRV] ``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)`` This function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``. Optional. ``write_wakeup`` [DRV] ``void ()(struct tty_struct *tty)`` This function is called by the low-level tty driver to signal that line discpline should try to send more characters to the low-level driver for transmission. If the line discpline does not have any more data to send, it can just return. If the line discipline does have some data to send, please arise a tasklet or workqueue to do the real data transfer. Do not send data in this hook, it may lead to a deadlock. Optional. ``dcd_change`` [DRV] ``void ()(struct tty_struct *tty, bool active)`` Tells the discipline that the DCD pin has changed its status. Used exclusively by the ``N_PPS`` (Pulse-Per-Second) line discipline. Optional. ``receive_buf2`` [DRV] ``ssize_t ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)`` This function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``. If assigned, prefer this function for automatic flow control. Optional. ``lookahead_buf`` [DRV] ``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)`` This function is called by the low-level tty driver for characters not eaten by ->receive_buf() or ->receive_buf2(). It is useful for processing high-priority characters such as software flow-control characters that could otherwise get stuck into the intermediate buffer until tty has room to receive them. Ldisc must be able to handle later a ->receive_buf() or ->receive_buf2() call for the same characters (e.g. by skipping the actions for high-priority characters already handled by ->lookahead_buf()). Optional. ``owner`` module containting this ldisc (for reference counting)h](h)}(h**Definition**::h](jw)}(h**Definition**h]h Definition}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK>hj ubh literal_block)}(hXstruct tty_ldisc_ops { char *name; int num; int (*open)(struct tty_struct *tty); void (*close)(struct tty_struct *tty); void (*flush_buffer)(struct tty_struct *tty); ssize_t (*read)(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr, void **cookie, unsigned long offset); ssize_t (*write)(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr); int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); int (*compat_ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, const struct ktermios *old); __poll_t (*poll)(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait); void (*hangup)(struct tty_struct *tty); void (*receive_buf)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); void (*write_wakeup)(struct tty_struct *tty); void (*dcd_change)(struct tty_struct *tty, bool active); size_t (*receive_buf2)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); void (*lookahead_buf)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); struct module *owner; };h]hXstruct tty_ldisc_ops { char *name; int num; int (*open)(struct tty_struct *tty); void (*close)(struct tty_struct *tty); void (*flush_buffer)(struct tty_struct *tty); ssize_t (*read)(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr, void **cookie, unsigned long offset); ssize_t (*write)(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr); int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); int (*compat_ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); void (*set_termios)(struct tty_struct *tty, const struct ktermios *old); __poll_t (*poll)(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait); void (*hangup)(struct tty_struct *tty); void (*receive_buf)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); void (*write_wakeup)(struct tty_struct *tty); void (*dcd_change)(struct tty_struct *tty, bool active); size_t (*receive_buf2)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); void (*lookahead_buf)(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count); struct module *owner; };}hj sbah}(h]h ]h"]h$]h&]hhuh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK@hj ubh)}(h **Members**h]jw)}(hj' h]hMembers}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj% ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKUhj ubj)}(hhh](j)}(h9``name`` name of this ldisc rendered in /proc/tty/ldiscs h](j)}(h``name``h]j)}(hjF h]hname}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK=hj@ ubj)}(hhh]h)}(h/name of this ldisc rendered in /proc/tty/ldiscsh]h/name of this ldisc rendered in /proc/tty/ldiscs}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[ hK=hj\ ubah}(h]h ]h"]h$]h&]uh1jhj@ ubeh}(h]h ]h"]h$]h&]uh1jhj[ hK=hj= ubj)}(hK``num`` ``N_*`` number (``N_TTY``, ``N_HDLC``, ...) reserved to this ldisc h](j)}(h``num``h]j)}(hj h]hnum}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj} ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK>hjy ubj)}(hhh]h)}(hB``N_*`` number (``N_TTY``, ``N_HDLC``, ...) reserved to this ldisch](j)}(h``N_*``h]hN_*}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh number (}(hj hhhNhNubj)}(h ``N_TTY``h]hN_TTY}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }(hj hhhNhNubj)}(h ``N_HDLC``h]hN_HDLC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, ...) reserved to this ldisc}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hK>hj ubah}(h]h ]h"]h$]h&]uh1jhjy ubeh}(h]h ]h"]h$]h&]uh1jhj hK>hj= ubj)}(hX ``open`` [TTY] ``int ()(struct tty_struct *tty)`` This function is called when the line discipline is associated with the **tty**. No other call into the line discipline for this tty will occur until it completes successfully. It should initialize any state needed by the ldisc, and set **tty->receive_room** to the maximum amount of data the line discipline is willing to accept from the driver with a single call to **receive_buf\(\)**. Returning an error will prevent the ldisc from being attached. Optional. Can sleep. h](j)}(h``open``h]j)}(hj h]hopen}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKJhj ubj)}(hhh](h)}(h([TTY] ``int ()(struct tty_struct *tty)``h](h[TTY] }(hj hhhNhNubj)}(h"``int ()(struct tty_struct *tty)``h]hint ()(struct tty_struct *tty)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK@hj ubh)}(hXThis function is called when the line discipline is associated with the **tty**. No other call into the line discipline for this tty will occur until it completes successfully. It should initialize any state needed by the ldisc, and set **tty->receive_room** to the maximum amount of data the line discipline is willing to accept from the driver with a single call to **receive_buf\(\)**. Returning an error will prevent the ldisc from being attached.h](hHThis function is called when the line discipline is associated with the }(hj hhhNhNubjw)}(h**tty**h]htty}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj ubh. No other call into the line discipline for this tty will occur until it completes successfully. It should initialize any state needed by the ldisc, and set }(hj hhhNhNubjw)}(h**tty->receive_room**h]htty->receive_room}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj ubhn to the maximum amount of data the line discipline is willing to accept from the driver with a single call to }(hj hhhNhNubjw)}(h**receive_buf\(\)**h]hreceive_buf()}(hjL hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj ubh@. Returning an error will prevent the ldisc from being attached.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKBhj ubh)}(hOptional. Can sleep.h]hOptional. Can sleep.}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKJhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKJhj= ubj)}(hXS``close`` [TTY] ``void ()(struct tty_struct *tty)`` This function is called when the line discipline is being shutdown, either because the **tty** is being closed or because the **tty** is being changed to use a new line discipline. At the point of execution no further users will enter the ldisc code for this tty. Optional. Can sleep. h](j)}(h ``close``h]j)}(hj h]hclose}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKShj ubj)}(hhh](h)}(h)[TTY] ``void ()(struct tty_struct *tty)``h](h[TTY] }(hj hhhNhNubj)}(h#``void ()(struct tty_struct *tty)``h]hvoid ()(struct tty_struct *tty)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKLhj ubh)}(hXThis function is called when the line discipline is being shutdown, either because the **tty** is being closed or because the **tty** is being changed to use a new line discipline. At the point of execution no further users will enter the ldisc code for this tty.h](hWThis function is called when the line discipline is being shutdown, either because the }(hj hhhNhNubjw)}(h**tty**h]htty}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj ubh is being closed or because the }(hj hhhNhNubjw)}(h**tty**h]htty}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj ubh is being changed to use a new line discipline. At the point of execution no further users will enter the ldisc code for this tty.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKNhj ubh)}(hOptional. Can sleep.h]hOptional. Can sleep.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKShj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKShj= ubj)}(hX``flush_buffer`` [TTY] ``void ()(struct tty_struct *tty)`` This function instructs the line discipline to clear its buffers of any input characters it may have queued to be delivered to the user mode process. It may be called at any point between open and close. Optional. h](j)}(h``flush_buffer``h]j)}(hj h]h flush_buffer}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK[hj ubj)}(hhh](h)}(h)[TTY] ``void ()(struct tty_struct *tty)``h](h[TTY] }(hj' hhhNhNubj)}(h#``void ()(struct tty_struct *tty)``h]hvoid ()(struct tty_struct *tty)}(hj/ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj' ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKUhj$ ubh)}(hThis function instructs the line discipline to clear its buffers of any input characters it may have queued to be delivered to the user mode process. It may be called at any point between open and close.h]hThis function instructs the line discipline to clear its buffers of any input characters it may have queued to be delivered to the user mode process. It may be called at any point between open and close.}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKWhj$ ubh)}(h Optional.h]h Optional.}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj# hK[hj$ ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj# hK[hj= ubj)}(hX``read`` [TTY] ``ssize_t ()(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr)`` This function is called when the user requests to read from the **tty**. The line discipline will return whatever characters it has buffered up for the user. If this function is not defined, the user will receive an ``EIO`` error. Multiple read calls may occur in parallel and the ldisc must deal with serialization issues. Optional: ``EIO`` unless provided. Can sleep. h](j)}(h``read``h]j)}(hjs h]hread}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjq ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKfhjm ubj)}(hhh](h)}(hS[TTY] ``ssize_t ()(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr)``h](h[TTY] }(hj hhhNhNubj)}(hM``ssize_t ()(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr)``h]hIssize_t ()(struct tty_struct *tty, struct file *file, u8 *buf, size_t nr)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK]hj ubh block_quote)}(hXsThis function is called when the user requests to read from the **tty**. The line discipline will return whatever characters it has buffered up for the user. If this function is not defined, the user will receive an ``EIO`` error. Multiple read calls may occur in parallel and the ldisc must deal with serialization issues. Optional: ``EIO`` unless provided. Can sleep. h](h)}(hXCThis function is called when the user requests to read from the **tty**. The line discipline will return whatever characters it has buffered up for the user. If this function is not defined, the user will receive an ``EIO`` error. Multiple read calls may occur in parallel and the ldisc must deal with serialization issues.h](h@This function is called when the user requests to read from the }(hj hhhNhNubjw)}(h**tty**h]htty}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj ubh. The line discipline will return whatever characters it has buffered up for the user. If this function is not defined, the user will receive an }(hj hhhNhNubj)}(h``EIO``h]hEIO}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhd error. Multiple read calls may occur in parallel and the ldisc must deal with serialization issues.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK`hj ubh)}(h-Optional: ``EIO`` unless provided. Can sleep.h](h Optional: }(hj hhhNhNubj)}(h``EIO``h]hEIO}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh unless provided. Can sleep.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hKfhj ubeh}(h]h ]h"]h$]h&]uh1j hj hK`hj ubeh}(h]h ]h"]h$]h&]uh1jhjm ubeh}(h]h ]h"]h$]h&]uh1jhj hKfhj= ubj)}(hX``write`` [TTY] ``ssize_t ()(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr)`` This function is called when the user requests to write to the **tty**. The line discipline will deliver the characters to the low-level tty device for transmission, optionally performing some processing on the characters first. If this function is not defined, the user will receive an ``EIO`` error. Optional: ``EIO`` unless provided. Can sleep. h](j)}(h ``write``h]j)}(hj h]hwrite}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKqhj ubj)}(hhh](h)}(hY[TTY] ``ssize_t ()(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr)``h](h[TTY] }(hj3 hhhNhNubj)}(hS``ssize_t ()(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr)``h]hOssize_t ()(struct tty_struct *tty, struct file *file, const u8 *buf, size_t nr)}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3 ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhhj0 ubj )}(hX]This function is called when the user requests to write to the **tty**. The line discipline will deliver the characters to the low-level tty device for transmission, optionally performing some processing on the characters first. If this function is not defined, the user will receive an ``EIO`` error. Optional: ``EIO`` unless provided. Can sleep. h](h)}(hX-This function is called when the user requests to write to the **tty**. The line discipline will deliver the characters to the low-level tty device for transmission, optionally performing some processing on the characters first. If this function is not defined, the user will receive an ``EIO`` error.h](h?This function is called when the user requests to write to the }(hjT hhhNhNubjw)}(h**tty**h]htty}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjT ubh. The line discipline will deliver the characters to the low-level tty device for transmission, optionally performing some processing on the characters first. If this function is not defined, the user will receive an }(hjT hhhNhNubj)}(h``EIO``h]hEIO}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT ubh error.}(hjT hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKkhjP ubh)}(h-Optional: ``EIO`` unless provided. Can sleep.h](h Optional: }(hj hhhNhNubj)}(h``EIO``h]hEIO}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh unless provided. Can sleep.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj/ hKqhjP ubeh}(h]h ]h"]h$]h&]uh1j hj hKkhj0 ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj/ hKqhj= ubj)}(hX``ioctl`` [TTY] ``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)`` This function is called when the user requests an ioctl which is not handled by the tty layer or the low-level tty driver. It is intended for ioctls which affect line discpline operation. Note that the search order for ioctls is (1) tty layer, (2) tty low-level driver, (3) line discpline. So a low-level driver can "grab" an ioctl request before the line discpline has a chance to see it. Optional. h](j)}(h ``ioctl``h]j)}(hj h]hioctl}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhK}hj ubj)}(hhh](h)}(hM[TTY] ``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)``h](h[TTY] }(hj hhhNhNubj)}(hG``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)``h]hCint ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKshj ubj )}(hXThis function is called when the user requests an ioctl which is not handled by the tty layer or the low-level tty driver. It is intended for ioctls which affect line discpline operation. Note that the search order for ioctls is (1) tty layer, (2) tty low-level driver, (3) line discpline. So a low-level driver can "grab" an ioctl request before the line discpline has a chance to see it. Optional. h](h)}(hXThis function is called when the user requests an ioctl which is not handled by the tty layer or the low-level tty driver. It is intended for ioctls which affect line discpline operation. Note that the search order for ioctls is (1) tty layer, (2) tty low-level driver, (3) line discpline. So a low-level driver can "grab" an ioctl request before the line discpline has a chance to see it.h]hXThis function is called when the user requests an ioctl which is not handled by the tty layer or the low-level tty driver. It is intended for ioctls which affect line discpline operation. Note that the search order for ioctls is (1) tty layer, (2) tty low-level driver, (3) line discpline. So a low-level driver can “grab” an ioctl request before the line discpline has a chance to see it.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKvhj ubh)}(h Optional.h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK}hj ubeh}(h]h ]h"]h$]h&]uh1j hjhKvhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hK}hj= ubj)}(hX``compat_ioctl`` [TTY] ``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)`` Process ioctl calls from 32-bit process on 64-bit system. Note that only ioctls that are neither "pointer to compatible structure" nor tty-generic. Something private that takes an integer or a pointer to wordsize-sensitive structure belongs here, but most of ldiscs will happily leave it ``NULL``. Optional. h](j)}(h``compat_ioctl``h]j)}(hj.h]h compat_ioctl}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj(ubj)}(hhh](h)}(hM[TTY] ``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)``h](h[TTY] }(hjGhhhNhNubj)}(hG``int ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)``h]hCint ()(struct tty_struct *tty, unsigned int cmd, unsigned long arg)}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjDubj )}(hX7Process ioctl calls from 32-bit process on 64-bit system. Note that only ioctls that are neither "pointer to compatible structure" nor tty-generic. Something private that takes an integer or a pointer to wordsize-sensitive structure belongs here, but most of ldiscs will happily leave it ``NULL``. Optional. h](h)}(h9Process ioctl calls from 32-bit process on 64-bit system.h]h9Process ioctl calls from 32-bit process on 64-bit system.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjdubh)}(hNote that only ioctls that are neither "pointer to compatible structure" nor tty-generic. Something private that takes an integer or a pointer to wordsize-sensitive structure belongs here, but most of ldiscs will happily leave it ``NULL``.h](hNote that only ioctls that are neither “pointer to compatible structure” nor tty-generic. Something private that takes an integer or a pointer to wordsize-sensitive structure belongs here, but most of ldiscs will happily leave it }(hjwhhhNhNubj)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubh.}(hjwhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjdubh)}(h Optional.h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChKhjdubeh}(h]h ]h"]h$]h&]uh1j hjvhKhjDubeh}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhjChKhj= ubj)}(h``set_termios`` [TTY] ``void ()(struct tty_struct *tty, const struct ktermios *old)`` This function notifies the line discpline that a change has been made to the termios structure. Optional. h](j)}(h``set_termios``h]j)}(hjh]h set_termios}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj)}(hhh](h)}(hE[TTY] ``void ()(struct tty_struct *tty, const struct ktermios *old)``h](h[TTY] }(hjhhhNhNubj)}(h?``void ()(struct tty_struct *tty, const struct ktermios *old)``h]h;void ()(struct tty_struct *tty, const struct ktermios *old)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h_This function notifies the line discpline that a change has been made to the termios structure.h]h_This function notifies the line discpline that a change has been made to the termios structure.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h Optional.h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj= ubj)}(hX&``poll`` [TTY] ``int ()(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait)`` This function is called when a user attempts to select/poll on a **tty** device. It is solely the responsibility of the line discipline to handle poll requests. Optional. h](j)}(h``poll``h]j)}(hj#h]hpoll}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj)}(hhh](h)}(h[[TTY] ``int ()(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait)``h](h[TTY] }(hj<hhhNhNubj)}(hU``int ()(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait)``h]hQint ()(struct tty_struct *tty, struct file *file, struct poll_table_struct *wait)}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj9ubj )}(hThis function is called when a user attempts to select/poll on a **tty** device. It is solely the responsibility of the line discipline to handle poll requests. Optional. h](h)}(hThis function is called when a user attempts to select/poll on a **tty** device. It is solely the responsibility of the line discipline to handle poll requests.h](hAThis function is called when a user attempts to select/poll on a }(hj]hhhNhNubjw)}(h**tty**h]htty}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj]ubhX device. It is solely the responsibility of the line discipline to handle poll requests.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjYubh)}(h Optional.h]h Optional.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hKhjYubeh}(h]h ]h"]h$]h&]uh1j hj}hKhj9ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj8hKhj= ubj)}(hXC``hangup`` [TTY] ``void ()(struct tty_struct *tty)`` Called on a hangup. Tells the discipline that it should cease I/O to the tty driver. The driver should seek to perform this action quickly but should wait until any pending driver I/O is completed. No further calls into the ldisc code will occur. Optional. Can sleep. h](j)}(h ``hangup``h]j)}(hjh]hhangup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj)}(hhh](h)}(h)[TTY] ``void ()(struct tty_struct *tty)``h](h[TTY] }(hjhhhNhNubj)}(h#``void ()(struct tty_struct *tty)``h]hvoid ()(struct tty_struct *tty)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(hCalled on a hangup. Tells the discipline that it should cease I/O to the tty driver. The driver should seek to perform this action quickly but should wait until any pending driver I/O is completed. No further calls into the ldisc code will occur.h]hCalled on a hangup. Tells the discipline that it should cease I/O to the tty driver. The driver should seek to perform this action quickly but should wait until any pending driver I/O is completed. No further calls into the ldisc code will occur.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(hOptional. Can sleep.h]hOptional. Can sleep.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj= ubj)}(hX&``receive_buf`` [DRV] ``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)`` This function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``. Optional. h](j)}(h``receive_buf``h]j)}(hj h]h receive_buf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj)}(hhh](h)}(hS[DRV] ``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h](h[DRV] }(hj"hhhNhNubj)}(hM``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h]hIvoid ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj )}(hXThis function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``. Optional. h](h)}(hXThis function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``.h](hThis function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. }(hjChhhNhNubjw)}(h**cp**h]hcp}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjCubhG is a pointer to the buffer of input character received by the device. }(hjChhhNhNubjw)}(h**fp**h]hfp}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjCubhr is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. }(hjChhhNhNubjw)}(h**fp**h]hfp}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjCubh may be }(hjChhhNhNubj)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubh" to indicate all data received is }(hjChhhNhNubj)}(h``TTY_NORMAL``h]h TTY_NORMAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubh.}(hjChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj?ubh)}(h Optional.h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhj?ubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj= ubj)}(hX``write_wakeup`` [DRV] ``void ()(struct tty_struct *tty)`` This function is called by the low-level tty driver to signal that line discpline should try to send more characters to the low-level driver for transmission. If the line discpline does not have any more data to send, it can just return. If the line discipline does have some data to send, please arise a tasklet or workqueue to do the real data transfer. Do not send data in this hook, it may lead to a deadlock. Optional. h](j)}(h``write_wakeup``h]j)}(hjh]h write_wakeup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj)}(hhh](h)}(h)[DRV] ``void ()(struct tty_struct *tty)``h](h[DRV] }(hjhhhNhNubj)}(h#``void ()(struct tty_struct *tty)``h]hvoid ()(struct tty_struct *tty)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(hXThis function is called by the low-level tty driver to signal that line discpline should try to send more characters to the low-level driver for transmission. If the line discpline does not have any more data to send, it can just return. If the line discipline does have some data to send, please arise a tasklet or workqueue to do the real data transfer. Do not send data in this hook, it may lead to a deadlock.h]hXThis function is called by the low-level tty driver to signal that line discpline should try to send more characters to the low-level driver for transmission. If the line discpline does not have any more data to send, it can just return. If the line discipline does have some data to send, please arise a tasklet or workqueue to do the real data transfer. Do not send data in this hook, it may lead to a deadlock.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h Optional.h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj= ubj)}(h``dcd_change`` [DRV] ``void ()(struct tty_struct *tty, bool active)`` Tells the discipline that the DCD pin has changed its status. Used exclusively by the ``N_PPS`` (Pulse-Per-Second) line discipline. Optional. h](j)}(h``dcd_change``h]j)}(hj7h]h dcd_change}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhj1ubj)}(hhh](h)}(h6[DRV] ``void ()(struct tty_struct *tty, bool active)``h](h[DRV] }(hjPhhhNhNubj)}(h0``void ()(struct tty_struct *tty, bool active)``h]h,void ()(struct tty_struct *tty, bool active)}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjMubh)}(hTells the discipline that the DCD pin has changed its status. Used exclusively by the ``N_PPS`` (Pulse-Per-Second) line discipline.h](hVTells the discipline that the DCD pin has changed its status. Used exclusively by the }(hjmhhhNhNubj)}(h ``N_PPS``h]hN_PPS}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh$ (Pulse-Per-Second) line discipline.}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjMubh)}(h Optional.h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhKhjMubeh}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhjLhKhj= ubj)}(hXn``receive_buf2`` [DRV] ``ssize_t ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)`` This function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``. If assigned, prefer this function for automatic flow control. Optional. h](j)}(h``receive_buf2``h]j)}(hjh]h receive_buf2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj)}(hhh](h)}(hV[DRV] ``ssize_t ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h](h[DRV] }(hjhhhNhNubj)}(hP``ssize_t ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h]hLssize_t ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj )}(hXThis function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``. If assigned, prefer this function for automatic flow control. Optional. h](h)}(hXThis function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. **cp** is a pointer to the buffer of input character received by the device. **fp** is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. **fp** may be ``NULL`` to indicate all data received is ``TTY_NORMAL``. If assigned, prefer this function for automatic flow control.h](hThis function is called by the low-level tty driver to send characters received by the hardware to the line discpline for processing. }(hjhhhNhNubjw)}(h**cp**h]hcp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubhH is a pointer to the buffer of input character received by the device. }(hjhhhNhNubjw)}(h**fp**h]hfp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubhr is a pointer to an array of flag bytes which indicate whether a character was received with a parity error, etc. }(hjhhhNhNubjw)}(h**fp**h]hfp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubh may be }(hjhhhNhNubj)}(h``NULL``h]hNULL}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh" to indicate all data received is }(hjhhhNhNubj)}(h``TTY_NORMAL``h]h TTY_NORMAL}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh?. If assigned, prefer this function for automatic flow control.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h Optional.h]h Optional.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjPhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj= ubj)}(hX``lookahead_buf`` [DRV] ``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)`` This function is called by the low-level tty driver for characters not eaten by ->receive_buf() or ->receive_buf2(). It is useful for processing high-priority characters such as software flow-control characters that could otherwise get stuck into the intermediate buffer until tty has room to receive them. Ldisc must be able to handle later a ->receive_buf() or ->receive_buf2() call for the same characters (e.g. by skipping the actions for high-priority characters already handled by ->lookahead_buf()). Optional. h](j)}(h``lookahead_buf``h]j)}(hjwh]h lookahead_buf}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjqubj)}(hhh](h)}(hS[DRV] ``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h](h[DRV] }(hjhhhNhNubj)}(hM``void ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)``h]hIvoid ()(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj )}(hXThis function is called by the low-level tty driver for characters not eaten by ->receive_buf() or ->receive_buf2(). It is useful for processing high-priority characters such as software flow-control characters that could otherwise get stuck into the intermediate buffer until tty has room to receive them. Ldisc must be able to handle later a ->receive_buf() or ->receive_buf2() call for the same characters (e.g. by skipping the actions for high-priority characters already handled by ->lookahead_buf()). Optional. h](h)}(hXThis function is called by the low-level tty driver for characters not eaten by ->receive_buf() or ->receive_buf2(). It is useful for processing high-priority characters such as software flow-control characters that could otherwise get stuck into the intermediate buffer until tty has room to receive them. Ldisc must be able to handle later a ->receive_buf() or ->receive_buf2() call for the same characters (e.g. by skipping the actions for high-priority characters already handled by ->lookahead_buf()).h]hXThis function is called by the low-level tty driver for characters not eaten by ->receive_buf() or ->receive_buf2(). It is useful for processing high-priority characters such as software flow-control characters that could otherwise get stuck into the intermediate buffer until tty has room to receive them. Ldisc must be able to handle later a ->receive_buf() or ->receive_buf2() call for the same characters (e.g. by skipping the actions for high-priority characters already handled by ->lookahead_buf()).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubh)}(h Optional.h]h Optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]uh1jhjhKhj= ubj)}(h@``owner`` module containting this ldisc (for reference counting)h](j)}(h ``owner``h]j)}(hjh]howner}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubj)}(hhh]h)}(h6module containting this ldisc (for reference counting)h]h6module containting this ldisc (for reference counting)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj= ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjj hhhj hNubh)}(h**Description**h]jw)}(hj)h]h Description}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj'ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjj hhubh)}(hThis structure defines the interface between the tty line discipline implementation and the tty routines. The above routines can be defined. Unless noted otherwise, they are optional, and can be filled in with a ``NULL`` pointer.h](hThis structure defines the interface between the tty line discipline implementation and the tty routines. The above routines can be defined. Unless noted otherwise, they are optional, and can be filled in with a }(hj?hhhNhNubj)}(h``NULL``h]hNULL}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh pointer.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjj hhubh)}(hZHooks marked [TTY] are invoked from the TTY core, the [DRV] ones from the tty_driver side.h]hZHooks marked [TTY] are invoked from the TTY core, the [DRV] ones from the tty_driver side.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:46: ./include/linux/tty_ldisc.hhKhjj hhubeh}(h]j2ah ]h"]$line discipline operations referenceah$]h&]uh1hhhhhhhhK,ubh)}(hhh](h)}(h Driver Accessh]h Driver Access}(hjyhhhNhNubah}(h]h ]h"]h$]h&]jjNuh1hhjvhhhhhK2ubh)}(hLine discipline methods can call the methods of the underlying hardware driver. These are documented as a part of struct tty_operations.h]hLine discipline methods can call the methods of the underlying hardware driver. These are documented as a part of struct tty_operations.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjvhhubeh}(h]jTah ]h"] driver accessah$]h&]uh1hhhhhhhhK2ubh)}(hhh](h)}(h TTY Flagsh]h TTY Flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]jjpuh1hhjhhhhhK8ubh)}(haLine discipline methods have access to :c:member:`tty_struct.flags` field. See :doc:`tty_struct`.h](h'Line discipline methods have access to }(hjhhhNhNubh)}(h:c:member:`tty_struct.flags`h]j)}(hjh]htty_struct.flags}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypemember refexplicitrefwarnjj)}j]sbjtty_struct.flagsuh1hhhhK:hjubh field. See }(hjhhhNhNubh)}(h:doc:`tty_struct`h]j)}(hjh]h tty_struct}(hjhhhNhNubah}(h]h ](jstdstd-doceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypedoc refexplicitrefwarnj tty_structuh1hhhhK:hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubeh}(h]jvah ]h"] tty flagsah$]h&]uh1hhhhhhhhK8ubh)}(hhh](h)}(hLockingh]hLocking}(hjhhhNhNubah}(h]h ]h"]h$]h&]jjuh1hhj hhhhhK>ubh)}(hCallers to the line discipline functions from the tty layer are required to take line discipline locks. The same is true of calls from the driver side but not yet enforced.h]hCallers to the line discipline functions from the tty layer are required to take line discipline locks. The same is true of calls from the driver side but not yet enforced.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hj hhubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_ref_wait (C function)c.tty_ldisc_ref_waithNtauh1j<hj hhhNhNubjN)}(hhh](jS)}(h>struct tty_ldisc * tty_ldisc_ref_wait (struct tty_struct *tty)h]jY)}(heh"]h$]h&]jBjC)jDhuh1jRhjQhKhj9hhubjF)}(hhh]h)}(hwait for the tty ldisch]hwait for the tty ldisc}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhj<hhubah}(h]h ]h"]h$]h&]uh1jEhj9hhhjQhKubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgjWjhjWjijjjkuh1jMhhhj hNhNubjm)}(hX**Parameters** ``struct tty_struct *tty`` tty device **Description** Dereference the line discipline for the terminal and take a reference to it. If the line discipline is in flux then wait patiently until it changes. Note 1: Must not be called from an IRQ/timer context. The caller must also be careful not to hold other locks that will deadlock against a discipline change, such as an existing ldisc reference (which we check for). Note 2: a file_operations routine (read/poll/write) should use this function to wait for any ldisc lifetime events to finish. **Return** ``NULL`` if the tty has been hungup and not re-opened with a new file descriptor, otherwise valid ldisc referenceh](h)}(h**Parameters**h]jw)}(hjah]h Parameters}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj_ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhj[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&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhjzubj)}(hhh]h)}(h tty deviceh]h tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]uh1jhjhKhjwubah}(h]h ]h"]h$]h&]uh1jhj[ubh)}(h**Description**h]jw)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhj[ubh)}(hDereference the line discipline for the terminal and take a reference to it. If the line discipline is in flux then wait patiently until it changes.h]hDereference the line discipline for the terminal and take a reference to it. If the line discipline is in flux then wait patiently until it changes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhj[ubh)}(hNote 1: Must not be called from an IRQ/timer context. The caller must also be careful not to hold other locks that will deadlock against a discipline change, such as an existing ldisc reference (which we check for).h]hNote 1: Must not be called from an IRQ/timer context. The caller must also be careful not to hold other locks that will deadlock against a discipline change, such as an existing ldisc reference (which we check for).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhj[ubh)}(h}Note 2: a file_operations routine (read/poll/write) should use this function to wait for any ldisc lifetime events to finish.h]h}Note 2: a file_operations routine (read/poll/write) should use this function to wait for any ldisc lifetime events to finish.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhj[ubh)}(h **Return**h]jw)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhj[ubh)}(hq``NULL`` if the tty has been hungup and not re-opened with a new file descriptor, otherwise valid ldisc referenceh](j)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhi if the tty has been hungup and not re-opened with a new file descriptor, otherwise valid ldisc reference}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhj[ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhj hhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_ref (C function)c.tty_ldisc_refhNtauh1j<hj hhhNhNubjN)}(hhh](jS)}(h9struct tty_ldisc * tty_ldisc_ref (struct tty_struct *tty)h]jY)}(h7struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty)h](j)}(hjh]hstruct}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hjahhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjOhhhj`hMubh)}(hhh]j)}(h tty_ldisch]h tty_ldisc}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjtmodnameN classnameNjj)}j]j)}j tty_ldisc_refsbc.tty_ldisc_refasbuh1hhjOhhhj`hMubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjOhhhj`hMubj)}(hj h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOhhhj`hMubj)}(h tty_ldisc_refh]j)}(hjh]h tty_ldisc_ref}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjOhhhj`hMubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.tty_ldisc_refasbuh1hhjubjq)}(h h]h }(hj hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hj h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(httyh]htty}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjOhhhj`hMubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hjKhhhj`hMubah}(h]jFah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhj`hMhjHhhubjF)}(hhh]h)}(hget the tty ldisch]hget the tty ldisc}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhjKhhubah}(h]h ]h"]h$]h&]uh1jEhjHhhhj`hMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgjfjhjfjijjjkuh1jMhhhj hNhNubjm)}(h**Parameters** ``struct tty_struct *tty`` tty device **Description** Dereference the line discipline for the terminal and take a reference to it. If the line discipline is in flux then return ``NULL``. Can be called from IRQ and timer functions.h](h)}(h**Parameters**h]jw)}(hjph]h Parameters}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjnubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chMhjjubj)}(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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhjubj)}(hhh]h)}(h tty deviceh]h tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjjubh)}(h**Description**h]jw)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhjjubh)}(hDereference the line discipline for the terminal and take a reference to it. If the line discipline is in flux then return ``NULL``. Can be called from IRQ and timer functions.h](h{Dereference the line discipline for the terminal and take a reference to it. If the line discipline is in flux then return }(hjhhhNhNubj)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh-. Can be called from IRQ and timer functions.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chKhjjubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhj hhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_deref (C function)c.tty_ldisc_derefhNtauh1j<hj hhhNhNubjN)}(hhh](jS)}(h+void tty_ldisc_deref (struct tty_ldisc *ld)h]jY)}(h*void tty_ldisc_deref(struct tty_ldisc *ld)h](j_)}(hvoidh]hvoid}(hj!hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hj0hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjhhhj/hMubj)}(htty_ldisc_derefh]j)}(htty_ldisc_derefh]htty_ldisc_deref}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhj/hMubj)}(h(struct tty_ldisc *ld)h]j)}(hstruct tty_ldisc *ldh](j)}(hjh]hstruct}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubjq)}(h h]h }(hjkhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjZubh)}(hhh]j)}(h tty_ldisch]h tty_ldisc}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj~modnameN classnameNjj)}j]j)}jjDsbc.tty_ldisc_derefasbuh1hhjZubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjZubj)}(hj h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubj)}(hldh]hld}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjVubah}(h]h ]h"]h$]h&]hhuh1jhjhhhj/hMubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hjhhhj/hMubah}(h]jah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhj/hMhjhhubjF)}(hhh]h)}(hfree a tty ldisc referenceh]hfree a tty ldisc reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chMhjhhubah}(h]h ]h"]h$]h&]uh1jEhjhhhj/hMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgjjhjjijjjkuh1jMhhhj hNhNubjm)}(h**Parameters** ``struct tty_ldisc *ld`` reference to free up **Description** Undoes the effect of tty_ldisc_ref() or tty_ldisc_ref_wait(). May be called in IRQ context.h](h)}(h**Parameters**h]jw)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chMhjubj)}(hhh]j)}(h.``struct tty_ldisc *ld`` reference to free up h](j)}(h``struct tty_ldisc *ld``h]j)}(hj"h]hstruct tty_ldisc *ld}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chMhjubj)}(hhh]h)}(hreference to free uph]hreference to free up}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMhj8ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj7hMhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jw)}(hj]h]h Description}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj[ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chMhjubh)}(h[Undoes the effect of tty_ldisc_ref() or tty_ldisc_ref_wait(). May be called in IRQ context.h]h[Undoes the effect of tty_ldisc_ref() or tty_ldisc_ref_wait(). May be called in IRQ context.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:68: ./drivers/tty/tty_ldisc.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhj hhhNhNubh)}(hWhile these functions are slightly slower than the old code they should have minimal impact as most receive logic uses the flip buffers and they only need to take a reference when they push bits up through the driver.h]hWhile these functions are slightly slower than the old code they should have minimal impact as most receive logic uses the flip buffers and they only need to take a reference when they push bits up through the driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhj hhubh)}(hXJA caution: The :c:member:`tty_ldisc_ops.open()`, :c:member:`tty_ldisc_ops.close()` and :c:member:`tty_driver.set_ldisc()` functions are called with the ldisc unavailable. Thus tty_ldisc_ref() will fail in this situation if used within these functions. Ldisc and driver code calling its own functions must be careful in this case.h](hA caution: The }(hjhhhNhNubh)}(h :c:member:`tty_ldisc_ops.open()`h]j)}(hjh]htty_ldisc_ops.open()}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypemember refexplicitrefwarnjjjtty_ldisc_ops.open()uh1hhhhKKhjubh, }(hjhhhNhNubh)}(h!:c:member:`tty_ldisc_ops.close()`h]j)}(hjh]htty_ldisc_ops.close()}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypemember refexplicitrefwarnjjjtty_ldisc_ops.close()uh1hhhhKKhjubh and }(hjhhhNhNubh)}(h":c:member:`tty_driver.set_ldisc()`h]j)}(hjh]htty_driver.set_ldisc()}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypemember refexplicitrefwarnjjjtty_driver.set_ldisc()uh1hhhhKKhjubh functions are called with the ldisc unavailable. Thus tty_ldisc_ref() will fail in this situation if used within these functions. Ldisc and driver code calling its own functions must be careful in this case.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKKhj hhubeh}(h]jah ]h"]lockingah$]h&]uh1hhhhhhhhK>ubh)}(hhh](h)}(hInternal Functionsh]hInternal Functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]jjuh1hhjhhhhhKRubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_get (C function)c.tty_ldisc_gethNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(hCstruct tty_ldisc * tty_ldisc_get (struct tty_struct *tty, int disc)h]jY)}(hAstruct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)h](j)}(hjh]hstruct}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKubjq)}(h h]h }(hjMhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj;hhhjLhKubh)}(hhh]j)}(h tty_ldisch]h tty_ldisc}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj`modnameN classnameNjj)}j]j)}j tty_ldisc_getsbc.tty_ldisc_getasbuh1hhj;hhhjLhKubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj;hhhjLhKubj)}(hj h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;hhhjLhKubj)}(h tty_ldisc_geth]j)}(hj|h]h tty_ldisc_get}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhj;hhhjLhKubj)}(h"(struct tty_struct *tty, int disc)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jzc.tty_ldisc_getasbuh1hhjubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hj h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(httyh]htty}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hint disch](j_)}(hinth]hint}(hj)hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj%ubjq)}(h h]h }(hj7hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj%ubj)}(hdisch]hdisc}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhj;hhhjLhKubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hj7hhhjLhKubah}(h]j2ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhjLhKhj4hhubjF)}(hhh]h)}(htake a reference to an ldisch]htake a reference to an ldisc}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKzhjlhhubah}(h]h ]h"]h$]h&]uh1jEhj4hhhjLhKubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgjjhjjijjjkuh1jMhhhjhNhNubjm)}(hX|**Parameters** ``struct tty_struct *tty`` tty device ``int disc`` ldisc number **Description** Takes a reference to a line discipline. Deals with refcounts and module locking counts. If the discipline is not available, its module loaded, if possible. Locking: takes ``tty_ldiscs_lock`` to guard against ldisc races **Return** * -``EINVAL`` if the discipline index is not [``N_TTY`` .. ``NR_LDISCS``] or if the discipline is not registered * -``EAGAIN`` if request_module() failed to load or register the discipline * -``ENOMEM`` if allocation failure * Otherwise, returns a pointer to the discipline and bumps the ref counth](h)}(h**Parameters**h]jw)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chK~hjubj)}(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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chK{hjubj)}(hhh]h)}(h tty deviceh]h tty device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK{hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK{hjubj)}(h``int disc`` ldisc number h](j)}(h ``int disc``h]j)}(hjh]hint disc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chK|hjubj)}(hhh]h)}(h ldisc numberh]h ldisc number}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK|hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK|hjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jw)}(hj$h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj"ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chK~hjubh)}(hTakes a reference to a line discipline. Deals with refcounts and module locking counts. If the discipline is not available, its module loaded, if possible.h]hTakes a reference to a line discipline. Deals with refcounts and module locking counts. If the discipline is not available, its module loaded, if possible.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chK~hjubh)}(h?Locking: takes ``tty_ldiscs_lock`` to guard against ldisc racesh](hLocking: takes }(hjIhhhNhNubj)}(h``tty_ldiscs_lock``h]htty_ldiscs_lock}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubh to guard against ldisc races}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjubh)}(h **Return**h]jw)}(hjlh]hReturn}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjubh)}(hhh](h)}(hn-``EINVAL`` if the discipline index is not [``N_TTY`` .. ``NR_LDISCS``] or if the discipline is not registeredh]h)}(hn-``EINVAL`` if the discipline index is not [``N_TTY`` .. ``NR_LDISCS``] or if the discipline is not registeredh](h-}(hjhhhNhNubj)}(h ``EINVAL``h]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh! if the discipline index is not [}(hjhhhNhNubj)}(h ``N_TTY``h]hN_TTY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh .. }(hjhhhNhNubj)}(h ``NR_LDISCS``h]h NR_LDISCS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh(] or if the discipline is not registered}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hI-``EAGAIN`` if request_module() failed to load or register the disciplineh]h)}(hjh](h-}(hjhhhNhNubj)}(h ``EAGAIN``h]hEAGAIN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh> if request_module() failed to load or register the discipline}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h!-``ENOMEM`` if allocation failureh]h)}(hjh](h-}(hjhhhNhNubj)}(h ``ENOMEM``h]hENOMEM}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh if allocation failure}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hFOtherwise, returns a pointer to the discipline and bumps the ref counth]h)}(hj*h]hFOtherwise, returns a pointer to the discipline and bumps the ref count}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhj(ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]bulletj uh1hhjhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_put (C function)c.tty_ldisc_puthNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h)void tty_ldisc_put (struct tty_ldisc *ld)h]jY)}(h(void tty_ldisc_put(struct tty_ldisc *ld)h](j_)}(hvoidh]hvoid}(hjghhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjchhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKubjq)}(h h]h }(hjvhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjchhhjuhKubj)}(h tty_ldisc_puth]j)}(h tty_ldisc_puth]h tty_ldisc_put}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjchhhjuhKubj)}(h(struct tty_ldisc *ld)h]j)}(hstruct tty_ldisc *ldh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubh)}(hhh]j)}(h tty_ldisch]h tty_ldisc}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.tty_ldisc_putasbuh1hhjubjq)}(h h]h }(hjhhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjubj)}(hj h]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hldh]hld}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjchhhjuhKubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hj_hhhjuhKubah}(h]jZah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhjuhKhj\hhubjF)}(hhh]h)}(hrelease the ldisch]hrelease the ldisc}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhj$hhubah}(h]h ]h"]h$]h&]uh1jEhj\hhhjuhKubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgj?jhj?jijjjkuh1jMhhhjhNhNubjm)}(hm**Parameters** ``struct tty_ldisc *ld`` lisdsc to release **Description** Complement of tty_ldisc_get().h](h)}(h**Parameters**h]jw)}(hjIh]h Parameters}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjGubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjCubj)}(hhh]j)}(h+``struct tty_ldisc *ld`` lisdsc to release h](j)}(h``struct tty_ldisc *ld``h]j)}(hjhh]hstruct tty_ldisc *ld}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjbubj)}(hhh]h)}(hlisdsc to releaseh]hlisdsc to release}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hKhj~ubah}(h]h ]h"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]uh1jhj}hKhj_ubah}(h]h ]h"]h$]h&]uh1jhjCubh)}(h**Description**h]jw)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjCubh)}(hComplement of tty_ldisc_get().h]hComplement of tty_ldisc_get().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chKhjCubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jI"tty_set_termios_ldisc (C function)c.tty_set_termios_ldischNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h=void tty_set_termios_ldisc (struct tty_struct *tty, int disc)h]jY)}(heh"]h$]h&]jBjC)jDhuh1jRhjhMhjhhubjF)}(hhh]h)}(hset ldisc fieldh]hset ldisc field}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjhhubah}(h]h ]h"]h$]h&]uh1jEhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgjjhjjijjjkuh1jMhhhjhNhNubjm)}(hX**Parameters** ``struct tty_struct *tty`` tty structure ``int disc`` line discipline number **Description** This is probably overkill for real world processors but they are not on hot paths so a little discipline won't do any harm. The line discipline-related tty_struct fields are reset to prevent the ldisc driver from re-using stale information for the new ldisc instance. Locking: takes termios_rwsemh](h)}(h**Parameters**h]jw)}(hjh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjubj)}(hhh](j)}(h)``struct tty_struct *tty`` tty structure 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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj ubj)}(hhh]h)}(h tty structureh]h tty structure}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3 hMhj4 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj3 hMhj ubj)}(h$``int disc`` line discipline number h](j)}(h ``int disc``h]j)}(hjW h]hint disc}(hjY hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjQ ubj)}(hhh]h)}(hline discipline numberh]hline discipline number}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl hMhjm ubah}(h]h ]h"]h$]h&]uh1jhjQ ubeh}(h]h ]h"]h$]h&]uh1jhjl hMhj ubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jw)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjubh)}(h{This is probably overkill for real world processors but they are not on hot paths so a little discipline won't do any harm.h]h}This is probably overkill for real world processors but they are not on hot paths so a little discipline won’t do any harm.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjubh)}(hThe line discipline-related tty_struct fields are reset to prevent the ldisc driver from re-using stale information for the new ldisc instance.h]hThe line discipline-related tty_struct fields are reset to prevent the ldisc driver from re-using stale information for the new ldisc instance.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjubh)}(hLocking: takes termios_rwsemh]hLocking: takes termios_rwsem}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_open (C function)c.tty_ldisc_openhNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(hAint tty_ldisc_open (struct tty_struct *tty, struct tty_ldisc *ld)h]jY)}(h@int tty_ldisc_open(struct tty_struct *tty, struct tty_ldisc *ld)h](j_)}(hinth]hint}(hj hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hj!hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj hhhj!hMubj)}(htty_ldisc_openh]j)}(htty_ldisc_openh]htty_ldisc_open}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj!hMubj)}(h.(struct tty_struct *tty, struct tty_ldisc *ld)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj2!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.!ubjq)}(h h]h }(hj?!hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj.!ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjP!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjM!ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjR!modnameN classnameNjj)}j]j)}jj!sbc.tty_ldisc_openasbuh1hhj.!ubjq)}(h h]h }(hjp!hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj.!ubj)}(hj h]h*}(hj~!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.!ubj)}(httyh]htty}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj*!ubj)}(hstruct tty_ldisc *ldh](j)}(hjh]hstruct}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubjq)}(h h]h }(hj!hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj!ubh)}(hhh]j)}(h tty_ldisch]h tty_ldisc}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj!modnameN classnameNjj)}j]jl!c.tty_ldisc_openasbuh1hhj!ubjq)}(h h]h }(hj!hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj!ubj)}(hj h]h*}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(hldh]hld}(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&]hhj7uh1jXj8j9hj hhhj!hMubah}(h]j ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhj!hMhj hhubjF)}(hhh]h)}(hopen a line disciplineh]hopen a line discipline}(hj%"hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj""hhubah}(h]h ]h"]h$]h&]uh1jEhj hhhj!hMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgj="jhj="jijjjkuh1jMhhhjhNhNubjm)}(hX**Parameters** ``struct tty_struct *tty`` tty we are opening the ldisc on ``struct tty_ldisc *ld`` discipline to open **Description** A helper opening method. Also a convenient debugging and check point. Locking: always called with BTM already held.h](h)}(h**Parameters**h]jw)}(hjG"h]h Parameters}(hjI"hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjE"ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjA"ubj)}(hhh](j)}(h;``struct tty_struct *tty`` tty we are opening the ldisc on h](j)}(h``struct tty_struct *tty``h]j)}(hjf"h]hstruct tty_struct *tty}(hjh"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjd"ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj`"ubj)}(hhh]h)}(htty we are opening the ldisc onh]htty we are opening the ldisc on}(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_ldisc *ld`` discipline to open h](j)}(h``struct tty_ldisc *ld``h]j)}(hj"h]hstruct tty_ldisc *ld}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj"ubj)}(hhh]h)}(hdiscipline to openh]hdiscipline to open}(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&]uh1jhjA"ubh)}(h**Description**h]jw)}(hj"h]h Description}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj"ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjA"ubh)}(hEA helper opening method. Also a convenient debugging and check point.h]hEA helper opening method. Also a convenient debugging and check point.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjA"ubh)}(h-Locking: always called with BTM already held.h]h-Locking: always called with BTM already held.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjA"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_close (C function)c.tty_ldisc_closehNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(hCvoid tty_ldisc_close (struct tty_struct *tty, struct tty_ldisc *ld)h]jY)}(hBvoid tty_ldisc_close(struct tty_struct *tty, struct tty_ldisc *ld)h](j_)}(hvoidh]hvoid}(hj.#hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj*#hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hj=#hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj*#hhhj<#hMubj)}(htty_ldisc_closeh]j)}(htty_ldisc_closeh]htty_ldisc_close}(hjO#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK#ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj*#hhhj<#hMubj)}(h.(struct tty_struct *tty, struct tty_ldisc *ld)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjk#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjg#ubjq)}(h h]h }(hjx#hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjg#ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj#modnameN classnameNjj)}j]j)}jjQ#sbc.tty_ldisc_closeasbuh1hhjg#ubjq)}(h h]h }(hj#hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjg#ubj)}(hj h]h*}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjg#ubj)}(httyh]htty}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjg#ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjc#ubj)}(hstruct tty_ldisc *ldh](j)}(hjh]hstruct}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubjq)}(h h]h }(hj#hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj#ubh)}(hhh]j)}(h tty_ldisch]h tty_ldisc}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj#modnameN classnameNjj)}j]j#c.tty_ldisc_closeasbuh1hhj#ubjq)}(h h]h }(hj$hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj#ubj)}(hj h]h*}(hj'$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(hldh]hld}(hj4$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjc#ubeh}(h]h ]h"]h$]h&]hhuh1jhj*#hhhj<#hMubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hj&#hhhj<#hMubah}(h]j!#ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhj<#hMhj##hhubjF)}(hhh]h)}(hclose a line disciplineh]hclose a line discipline}(hj^$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj[$hhubah}(h]h ]h"]h$]h&]uh1jEhj##hhhj<#hMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgjv$jhjv$jijjjkuh1jMhhhjhNhNubjm)}(h**Parameters** ``struct tty_struct *tty`` tty we are opening the ldisc on ``struct tty_ldisc *ld`` discipline to close **Description** A helper close method. Also a convenient debugging and check point.h](h)}(h**Parameters**h]jw)}(hj$h]h Parameters}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj~$ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjz$ubj)}(hhh](j)}(h;``struct tty_struct *tty`` tty we are opening the ldisc 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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj$ubj)}(hhh]h)}(htty we are opening the ldisc onh]htty we are opening the ldisc on}(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_ldisc *ld`` discipline to close h](j)}(h``struct tty_ldisc *ld``h]j)}(hj$h]hstruct tty_ldisc *ld}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj$ubj)}(hhh]h)}(hdiscipline to closeh]hdiscipline to close}(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&]uh1jhjz$ubh)}(h**Description**h]jw)}(hj%h]h Description}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj%ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjz$ubh)}(hCA helper close method. Also a convenient debugging and check point.h]hCA helper close method. Also a convenient debugging and check point.}(hj)%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjz$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_failto (C function)c.tty_ldisc_failtohNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h5int tty_ldisc_failto (struct tty_struct *tty, int ld)h]jY)}(h4int tty_ldisc_failto(struct tty_struct *tty, int ld)h](j_)}(hinth]hint}(hjX%hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjT%hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hjg%hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjT%hhhjf%hMubj)}(htty_ldisc_failtoh]j)}(htty_ldisc_failtoh]htty_ldisc_failto}(hjy%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju%ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjT%hhhjf%hMubj)}(h (struct tty_struct *tty, int ld)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubjq)}(h h]h }(hj%hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj%ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj%modnameN classnameNjj)}j]j)}jj{%sbc.tty_ldisc_failtoasbuh1hhj%ubjq)}(h h]h }(hj%hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj%ubj)}(hj h]h*}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(httyh]htty}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj%ubj)}(hint ldh](j_)}(hinth]hint}(hj&hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj&ubjq)}(h h]h }(hj&hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj&ubj)}(hldh]hld}(hj#&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj%ubeh}(h]h ]h"]h$]h&]hhuh1jhjT%hhhjf%hMubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hjP%hhhjf%hMubah}(h]jK%ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhjf%hMhjM%hhubjF)}(hhh]h)}(hhelper for ldisc failbackh]hhelper for ldisc failback}(hjM&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjJ&hhubah}(h]h ]h"]h$]h&]uh1jEhjM%hhhjf%hMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgje&jhje&jijjjkuh1jMhhhjhNhNubjm)}(h**Parameters** ``struct tty_struct *tty`` tty to open the ldisc on ``int ld`` ldisc we are trying to fail back to **Description** Helper to try and recover a tty when switching back to the old ldisc fails and we need something attached.h](h)}(h**Parameters**h]jw)}(hjo&h]h Parameters}(hjq&hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjm&ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhji&ubj)}(hhh](j)}(h4``struct tty_struct *tty`` tty to open the ldisc 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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj&ubj)}(hhh]h)}(htty to open the ldisc onh]htty to open the ldisc on}(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/``int ld`` ldisc we are trying to fail back to h](j)}(h ``int ld``h]j)}(hj&h]hint ld}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj&ubj)}(hhh]h)}(h#ldisc we are trying to fail back toh]h#ldisc we are trying to fail back to}(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&]uh1jhji&ubh)}(h**Description**h]jw)}(hj'h]h Description}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj'ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhji&ubh)}(hjHelper to try and recover a tty when switching back to the old ldisc fails and we need something attached.h]hjHelper to try and recover a tty when switching back to the old ldisc fails and we need something attached.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhji&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_restore (C function)c.tty_ldisc_restorehNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(hFvoid tty_ldisc_restore (struct tty_struct *tty, struct tty_ldisc *old)h]jY)}(hEvoid tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)h](j_)}(hvoidh]hvoid}(hjG'hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjC'hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hjV'hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjC'hhhjU'hMubj)}(htty_ldisc_restoreh]j)}(htty_ldisc_restoreh]htty_ldisc_restore}(hjh'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjd'ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjC'hhhjU'hMubj)}(h/(struct tty_struct *tty, struct tty_ldisc *old)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubjq)}(h h]h }(hj'hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj'ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj'modnameN classnameNjj)}j]j)}jjj'sbc.tty_ldisc_restoreasbuh1hhj'ubjq)}(h h]h }(hj'hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj'ubj)}(hj h]h*}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(httyh]htty}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj|'ubj)}(hstruct tty_ldisc *oldh](j)}(hjh]hstruct}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubjq)}(h h]h }(hj(hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj'ubh)}(hhh]j)}(h tty_ldisch]h tty_ldisc}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj(modnameN classnameNjj)}j]j'c.tty_ldisc_restoreasbuh1hhj'ubjq)}(h h]h }(hj2(hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj'ubj)}(hj h]h*}(hj@(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(holdh]hold}(hjM(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj|'ubeh}(h]h ]h"]h$]h&]hhuh1jhjC'hhhjU'hMubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hj?'hhhjU'hMubah}(h]j:'ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhjU'hMhj<'hhubjF)}(hhh]h)}(hhelper for tty ldisc changeh]hhelper for tty ldisc change}(hjw(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjt(hhubah}(h]h ]h"]h$]h&]uh1jEhj<'hhhjU'hMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgj(jhj(jijjjkuh1jMhhhjhNhNubjm)}(h**Parameters** ``struct tty_struct *tty`` tty to recover ``struct tty_ldisc *old`` previous ldisc **Description** Restore the previous line discipline or ``N_TTY`` when a line discipline change fails due to an open errorh](h)}(h**Parameters**h]jw)}(hj(h]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj(ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj(ubj)}(hhh](j)}(h*``struct tty_struct *tty`` tty to recover 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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj(ubj)}(hhh]h)}(htty to recoverh]htty to recover}(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_ldisc *old`` previous ldisc h](j)}(h``struct tty_ldisc *old``h]j)}(hj(h]hstruct tty_ldisc *old}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj(ubj)}(hhh]h)}(hprevious ldisch]hprevious ldisc}(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&]uh1jhj(ubh)}(h**Description**h]jw)}(hj,)h]h Description}(hj.)hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj*)ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj(ubh)}(hjRestore the previous line discipline or ``N_TTY`` when a line discipline change fails due to an open errorh](h(Restore the previous line discipline or }(hjB)hhhNhNubj)}(h ``N_TTY``h]hN_TTY}(hjJ)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB)ubh9 when a line discipline change fails due to an open error}(hjB)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_kill (C function)c.tty_ldisc_killhNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h,void tty_ldisc_kill (struct tty_struct *tty)h]jY)}(h+void tty_ldisc_kill(struct tty_struct *tty)h](j_)}(hvoidh]hvoid}(hj)hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj)hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM]ubjq)}(h h]h }(hj)hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj)hhhj)hM]ubj)}(htty_ldisc_killh]j)}(htty_ldisc_killh]htty_ldisc_kill}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj)hhhj)hM]ubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubjq)}(h h]h }(hj)hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj)ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj)modnameN classnameNjj)}j]j)}jj)sbc.tty_ldisc_killasbuh1hhj)ubjq)}(h h]h }(hj)hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj)ubj)}(hj h]h*}(hj *hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(httyh]htty}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj)ubah}(h]h ]h"]h$]h&]hhuh1jhj)hhhj)hM]ubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hj{)hhhj)hM]ubah}(h]jv)ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhj)hM]hjx)hhubjF)}(hhh]h)}(hteardown ldisch]hteardown ldisc}(hjC*hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMXhj@*hhubah}(h]h ]h"]h$]h&]uh1jEhjx)hhhj)hM]ubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgj[*jhj[*jijjjkuh1jMhhhjhNhNubjm)}(h**Parameters** ``struct tty_struct *tty`` tty being released **Description** Perform final close of the ldisc and reset **tty->ldisc**h](h)}(h**Parameters**h]jw)}(hje*h]h Parameters}(hjg*hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjc*ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM\hj_*ubj)}(hhh]j)}(h.``struct tty_struct *tty`` tty being released 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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMYhj~*ubj)}(hhh]h)}(htty being releasedh]htty being released}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hMYhj*ubah}(h]h ]h"]h$]h&]uh1jhj~*ubeh}(h]h ]h"]h$]h&]uh1jhj*hMYhj{*ubah}(h]h ]h"]h$]h&]uh1jhj_*ubh)}(h**Description**h]jw)}(hj*h]h Description}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj*ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM[hj_*ubh)}(h9Perform final close of the ldisc and reset **tty->ldisc**h](h+Perform final close of the ldisc and reset }(hj*hhhNhNubjw)}(h**tty->ldisc**h]h tty->ldisc}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj*ubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM[hj_*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_reset_termios (C function)c.tty_reset_termioshNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h/void tty_reset_termios (struct tty_struct *tty)h]jY)}(h.void tty_reset_termios(struct tty_struct *tty)h](j_)}(hvoidh]hvoid}(hj+hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj+hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMqubjq)}(h h]h }(hj!+hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj+hhhj +hMqubj)}(htty_reset_termiosh]j)}(htty_reset_termiosh]htty_reset_termios}(hj3+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/+ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj+hhhj +hMqubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjO+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK+ubjq)}(h h]h }(hj\+hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjK+ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjm+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjj+ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjo+modnameN classnameNjj)}j]j)}jj5+sbc.tty_reset_termiosasbuh1hhjK+ubjq)}(h h]h }(hj+hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjK+ubj)}(hj h]h*}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK+ubj)}(httyh]htty}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK+ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjG+ubah}(h]h ]h"]h$]h&]hhuh1jhj+hhhj +hMqubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hj +hhhj +hMqubah}(h]j+ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhj +hMqhj+hhubjF)}(hhh]h)}(hreset terminal stateh]hreset terminal state}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMlhj+hhubah}(h]h ]h"]h$]h&]uh1jEhj+hhhj +hMqubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgj+jhj+jijjjkuh1jMhhhjhNhNubjm)}(h{**Parameters** ``struct tty_struct *tty`` tty to reset **Description** Restore a terminal to the driver default state.h](h)}(h**Parameters**h]jw)}(hj+h]h Parameters}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj+ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMphj+ubj)}(hhh]j)}(h(``struct tty_struct *tty`` tty to reset 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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMmhj ,ubj)}(hhh]h)}(h tty to reseth]h tty to reset}(hj,,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(,hMmhj),ubah}(h]h ]h"]h$]h&]uh1jhj ,ubeh}(h]h ]h"]h$]h&]uh1jhj(,hMmhj ,ubah}(h]h ]h"]h$]h&]uh1jhj+ubh)}(h**Description**h]jw)}(hjN,h]h Description}(hjP,hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjL,ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMohj+ubh)}(h/Restore a terminal to the driver default state.h]h/Restore a terminal to the driver default state.}(hjd,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMohj+ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_reinit (C function)c.tty_ldisc_reinithNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h7int tty_ldisc_reinit (struct tty_struct *tty, int disc)h]jY)}(h6int tty_ldisc_reinit(struct tty_struct *tty, int disc)h](j_)}(hinth]hint}(hj,hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj,hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hj,hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj,hhhj,hMubj)}(htty_ldisc_reinith]j)}(htty_ldisc_reinith]htty_ldisc_reinit}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj,hhhj,hMubj)}(h"(struct tty_struct *tty, int disc)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubjq)}(h h]h }(hj,hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj,ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj,modnameN classnameNjj)}j]j)}jj,sbc.tty_ldisc_reinitasbuh1hhj,ubjq)}(h h]h }(hj-hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj,ubj)}(hj h]h*}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj)}(httyh]htty}(hj)-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj,ubj)}(hint disch](j_)}(hinth]hint}(hjB-hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj>-ubjq)}(h h]h }(hjP-hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj>-ubj)}(hdisch]hdisc}(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&]hhj7uh1jXj8j9hj,hhhj,hMubah}(h]j,ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhj,hMhj,hhubjF)}(hhh]h)}(hreinitialise the tty ldisch]hreinitialise the tty ldisc}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM|hj-hhubah}(h]h ]h"]h$]h&]uh1jEhj,hhhj,hMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgj-jhj-jijjjkuh1jMhhhjhNhNubjm)}(hX**Parameters** ``struct tty_struct *tty`` tty to reinit ``int disc`` line discipline to reinitialize **Description** Completely reinitialize the line discipline state, by closing the current instance, if there is one, and opening a new instance. If an error occurs opening the new non-``N_TTY`` instance, the instance is dropped and **tty->ldisc** reset to ``NULL``. The caller can then retry with ``N_TTY`` instead. **Return** 0 if successful, otherwise error code < 0h](h)}(h**Parameters**h]jw)}(hj-h]h Parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj-ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj-ubj)}(hhh](j)}(h)``struct tty_struct *tty`` tty to reinit 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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM}hj-ubj)}(hhh]h)}(h tty to reinith]h tty to reinit}(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-ubj)}(h-``int disc`` line discipline to reinitialize h](j)}(h ``int disc``h]j)}(hj.h]hint disc}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM~hj-ubj)}(hhh]h)}(hline discipline to reinitializeh]hline discipline to reinitialize}(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&]uh1jhj-ubh)}(h**Description**h]jw)}(hj=.h]h Description}(hj?.hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj;.ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj-ubh)}(hX+Completely reinitialize the line discipline state, by closing the current instance, if there is one, and opening a new instance. If an error occurs opening the new non-``N_TTY`` instance, the instance is dropped and **tty->ldisc** reset to ``NULL``. The caller can then retry with ``N_TTY`` instead.h](hCompletely reinitialize the line discipline state, by closing the current instance, if there is one, and opening a new instance. If an error occurs opening the new non-}(hjS.hhhNhNubj)}(h ``N_TTY``h]hN_TTY}(hj[.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS.ubh' instance, the instance is dropped and }(hjS.hhhNhNubjw)}(h**tty->ldisc**h]h tty->ldisc}(hjm.hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhjS.ubh reset to }(hjS.hhhNhNubj)}(h``NULL``h]hNULL}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS.ubh!. The caller can then retry with }(hjS.hhhNhNubj)}(h ``N_TTY``h]hN_TTY}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS.ubh instead.}(hjS.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj-ubh)}(h **Return**h]jw)}(hj.h]hReturn}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj.ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj-ubh)}(h)0 if successful, otherwise error code < 0h]h)0 if successful, otherwise error code < 0}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_hangup (C function)c.tty_ldisc_hanguphNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h;void tty_ldisc_hangup (struct tty_struct *tty, bool reinit)h]jY)}(h:void tty_ldisc_hangup(struct tty_struct *tty, bool reinit)h](j_)}(hvoidh]hvoid}(hj.hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj.hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hj/hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj.hhhj.hMubj)}(htty_ldisc_hanguph]j)}(htty_ldisc_hanguph]htty_ldisc_hangup}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj.hhhj.hMubj)}(h%(struct tty_struct *tty, bool reinit)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj./hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*/ubjq)}(h h]h }(hj;/hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj*/ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjL/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI/ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjN/modnameN classnameNjj)}j]j)}jj/sbc.tty_ldisc_hangupasbuh1hhj*/ubjq)}(h h]h }(hjl/hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj*/ubj)}(hj h]h*}(hjz/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*/ubj)}(httyh]htty}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*/ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj&/ubj)}(h bool reinith](j_)}(hboolh]hbool}(hj/hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj/ubjq)}(h h]h }(hj/hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj/ubj)}(hreinith]hreinit}(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&]hhj7uh1jXj8j9hj.hhhj.hMubah}(h]j.ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhj.hMhj.hhubjF)}(hhh]h)}(hhangup ldisc reseth]hhangup ldisc reset}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj/hhubah}(h]h ]h"]h$]h&]uh1jEhj.hhhj.hMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgj/jhj/jijjjkuh1jMhhhjhNhNubjm)}(hX**Parameters** ``struct tty_struct *tty`` tty being hung up ``bool reinit`` whether to re-initialise the tty **Description** Some tty devices reset their termios when they receive a hangup event. In that situation we must also switch back to ``N_TTY`` properly before we reset the termios data. Locking: We can take the ldisc mutex as the rest of the code is careful to allow for this. In the pty pair case this occurs in the close() path of the tty itself so we must be careful about locking rules.h](h)}(h**Parameters**h]jw)}(hj0h]h Parameters}(hj 0hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj0ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj0ubj)}(hhh](j)}(h-``struct tty_struct *tty`` tty being hung up h](j)}(h``struct tty_struct *tty``h]j)}(hj'0h]hstruct tty_struct *tty}(hj)0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%0ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj!0ubj)}(hhh]h)}(htty being hung uph]htty being hung up}(hj@0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<0hMhj=0ubah}(h]h ]h"]h$]h&]uh1jhj!0ubeh}(h]h ]h"]h$]h&]uh1jhj<0hMhj0ubj)}(h1``bool reinit`` whether to re-initialise the tty h](j)}(h``bool reinit``h]j)}(hj`0h]h bool reinit}(hjb0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^0ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjZ0ubj)}(hhh]h)}(h whether to re-initialise the ttyh]h whether to re-initialise the tty}(hjy0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhju0hMhjv0ubah}(h]h ]h"]h$]h&]uh1jhjZ0ubeh}(h]h ]h"]h$]h&]uh1jhju0hMhj0ubeh}(h]h ]h"]h$]h&]uh1jhj0ubh)}(h**Description**h]jw)}(hj0h]h Description}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj0ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj0ubh)}(hSome tty devices reset their termios when they receive a hangup event. In that situation we must also switch back to ``N_TTY`` properly before we reset the termios data.h](huSome tty devices reset their termios when they receive a hangup event. In that situation we must also switch back to }(hj0hhhNhNubj)}(h ``N_TTY``h]hN_TTY}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh+ properly before we reset the termios data.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj0ubh)}(hZLocking: We can take the ldisc mutex as the rest of the code is careful to allow for this.h]hZLocking: We can take the ldisc mutex as the rest of the code is careful to allow for this.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj0ubh)}(hqIn the pty pair case this occurs in the close() path of the tty itself so we must be careful about locking rules.h]hqIn the pty pair case this occurs in the close() path of the tty itself so we must be careful about locking rules.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj0ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_setup (C function)c.tty_ldisc_setuphNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(hFint tty_ldisc_setup (struct tty_struct *tty, struct tty_struct *o_tty)h]jY)}(hEint tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty)h](j_)}(hinth]hint}(hj1hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj 1hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hj1hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj 1hhhj1hMubj)}(htty_ldisc_setuph]j)}(htty_ldisc_setuph]htty_ldisc_setup}(hj11hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-1ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj 1hhhj1hMubj)}(h2(struct tty_struct *tty, struct tty_struct *o_tty)h](j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hjM1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI1ubjq)}(h h]h }(hjZ1hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjI1ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hjk1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh1ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjm1modnameN classnameNjj)}j]j)}jj31sbc.tty_ldisc_setupasbuh1hhjI1ubjq)}(h h]h }(hj1hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjI1ubj)}(hj h]h*}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI1ubj)}(httyh]htty}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI1ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjE1ubj)}(hstruct tty_struct *o_ttyh](j)}(hjh]hstruct}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubjq)}(h h]h }(hj1hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj1ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj1modnameN classnameNjj)}j]j1c.tty_ldisc_setupasbuh1hhj1ubjq)}(h h]h }(hj1hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj1ubj)}(hj h]h*}(hj 2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubj)}(ho_ttyh]ho_tty}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjE1ubeh}(h]h ]h"]h$]h&]hhuh1jhj 1hhhj1hMubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hj1hhhj1hMubah}(h]j1ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhj1hMhj1hhubjF)}(hhh]h)}(hopen line disciplineh]hopen line discipline}(hj@2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj=2hhubah}(h]h ]h"]h$]h&]uh1jEhj1hhhj1hMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgjX2jhjX2jijjjkuh1jMhhhjhNhNubjm)}(hX?**Parameters** ``struct tty_struct *tty`` tty being shut down ``struct tty_struct *o_tty`` pair tty for pty/tty pairs **Description** Called during the initial open of a tty/pty pair in order to set up the line disciplines and bind them to the **tty**. This has no locking issues as the device isn't yet active.h](h)}(h**Parameters**h]jw)}(hjb2h]h Parameters}(hjd2hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj`2ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj\2ubj)}(hhh](j)}(h/``struct tty_struct *tty`` tty being shut down 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&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj{2ubj)}(hhh]h)}(htty being shut downh]htty being shut down}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jhj{2ubeh}(h]h ]h"]h$]h&]uh1jhj2hMhjx2ubj)}(h8``struct tty_struct *o_tty`` pair tty for pty/tty pairs h](j)}(h``struct tty_struct *o_tty``h]j)}(hj2h]hstruct tty_struct *o_tty}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj2ubj)}(hhh]h)}(hpair tty for pty/tty pairsh]hpair tty for pty/tty pairs}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2hMhjx2ubeh}(h]h ]h"]h$]h&]uh1jhj\2ubh)}(h**Description**h]jw)}(hj2h]h Description}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj2ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj\2ubh)}(hCalled during the initial open of a tty/pty pair in order to set up the line disciplines and bind them to the **tty**. This has no locking issues as the device isn't yet active.h](hnCalled during the initial open of a tty/pty pair in order to set up the line disciplines and bind them to the }(hj 3hhhNhNubjw)}(h**tty**h]htty}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj 3ubh>. This has no locking issues as the device isn’t yet active.}(hj 3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj\2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_release (C function)c.tty_ldisc_releasehNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h/void tty_ldisc_release (struct tty_struct *tty)h]jY)}(h.void tty_ldisc_release(struct tty_struct *tty)h](j_)}(hvoidh]hvoid}(hjL3hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjH3hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMubjq)}(h h]h }(hj[3hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphjH3hhhjZ3hMubj)}(htty_ldisc_releaseh]j)}(htty_ldisc_releaseh]htty_ldisc_release}(hjm3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhji3ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjH3hhhjZ3hMubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubjq)}(h h]h }(hj3hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj3ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj3modnameN classnameNjj)}j]j)}jjo3sbc.tty_ldisc_releaseasbuh1hhj3ubjq)}(h h]h }(hj3hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj3ubj)}(hj h]h*}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(httyh]htty}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj3ubah}(h]h ]h"]h$]h&]hhuh1jhjH3hhhjZ3hMubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hjD3hhhjZ3hMubah}(h]j?3ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhjZ3hMhjA3hhubjF)}(hhh]h)}(hrelease line disciplineh]hrelease line discipline}(hj 4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj 4hhubah}(h]h ]h"]h$]h&]uh1jEhjA3hhhjZ3hMubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgj$4jhj$4jijjjkuh1jMhhhjhNhNubjm)}(h**Parameters** ``struct tty_struct *tty`` tty being shut down (or one end of pty pair) **Description** Called during the final close of a tty or a pty pair in order to shut down the line discpline layer. On exit, each tty's ldisc is ``NULL``.h](h)}(h**Parameters**h]jw)}(hj.4h]h Parameters}(hj04hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj,4ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj(4ubj)}(hhh]j)}(hH``struct tty_struct *tty`` tty being shut down (or one end of pty pair) h](j)}(h``struct tty_struct *tty``h]j)}(hjM4h]hstruct tty_struct *tty}(hjO4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjK4ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhjG4ubj)}(hhh]h)}(h,tty being shut down (or one end of pty pair)h]h,tty being shut down (or one end of pty pair)}(hjf4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjb4hMhjc4ubah}(h]h ]h"]h$]h&]uh1jhjG4ubeh}(h]h ]h"]h$]h&]uh1jhjb4hMhjD4ubah}(h]h ]h"]h$]h&]uh1jhj(4ubh)}(h**Description**h]jw)}(hj4h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj4ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj(4ubh)}(hCalled during the final close of a tty or a pty pair in order to shut down the line discpline layer. On exit, each tty's ldisc is ``NULL``.h](hCalled during the final close of a tty or a pty pair in order to shut down the line discpline layer. On exit, each tty’s ldisc is }(hj4hhhNhNubj)}(h``NULL``h]hNULL}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj(4ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_init (C function)c.tty_ldisc_inithNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h+int tty_ldisc_init (struct tty_struct *tty)h]jY)}(h*int tty_ldisc_init(struct tty_struct *tty)h](j_)}(hinth]hint}(hj4hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj4hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM!ubjq)}(h h]h }(hj4hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj4hhhj4hM!ubj)}(htty_ldisc_inith]j)}(htty_ldisc_inith]htty_ldisc_init}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj4hhhj4hM!ubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubjq)}(h h]h }(hj)5hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj5ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj:5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj75ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj<5modnameN classnameNjj)}j]j)}jj5sbc.tty_ldisc_initasbuh1hhj5ubjq)}(h h]h }(hjZ5hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj5ubj)}(hj h]h*}(hjh5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj)}(httyh]htty}(hju5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj5ubah}(h]h ]h"]h$]h&]hhuh1jhj4hhhj4hM!ubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hj4hhhj4hM!ubah}(h]j4ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhj4hM!hj4hhubjF)}(hhh]h)}(hldisc setup for new ttyh]hldisc setup for new tty}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj5hhubah}(h]h ]h"]h$]h&]uh1jEhj4hhhj4hM!ubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgj5jhj5jijjjkuh1jMhhhjhNhNubjm)}(h**Parameters** ``struct tty_struct *tty`` tty being allocated **Description** Set up the line discipline objects for a newly allocated tty. Note that the tty structure is not completely set up when this call is made.h](h)}(h**Parameters**h]jw)}(hj5h]h Parameters}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj5ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj5ubj)}(hhh]j)}(h/``struct tty_struct *tty`` tty being allocated h](j)}(h``struct tty_struct *tty``h]j)}(hj5h]hstruct tty_struct *tty}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj5ubj)}(hhh]h)}(htty being allocatedh]htty being allocated}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMhj5ubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhj5hMhj5ubah}(h]h ]h"]h$]h&]uh1jhj5ubh)}(h**Description**h]jw)}(hj6h]h Description}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj6ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj5ubh)}(hSet up the line discipline objects for a newly allocated tty. Note that the tty structure is not completely set up when this call is made.h]hSet up the line discipline objects for a newly allocated tty. Note that the tty structure is not completely set up when this call is made.}(hj16hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chMhj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubj=)}(hhh]h}(h]h ]h"]h$]h&]entries](jItty_ldisc_deinit (C function)c.tty_ldisc_deinithNtauh1j<hjhhhNhNubjN)}(hhh](jS)}(h.void tty_ldisc_deinit (struct tty_struct *tty)h]jY)}(h-void tty_ldisc_deinit(struct tty_struct *tty)h](j_)}(hvoidh]hvoid}(hj`6hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj\6hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM2ubjq)}(h h]h }(hjo6hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj\6hhhjn6hM2ubj)}(htty_ldisc_deinith]j)}(htty_ldisc_deinith]htty_ldisc_deinit}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}6ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj\6hhhjn6hM2ubj)}(h(struct tty_struct *tty)h]j)}(hstruct tty_struct *ttyh](j)}(hjh]hstruct}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubjq)}(h h]h }(hj6hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj6ubh)}(hhh]j)}(h tty_structh]h tty_struct}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj6modnameN classnameNjj)}j]j)}jj6sbc.tty_ldisc_deinitasbuh1hhj6ubjq)}(h h]h }(hj6hhhNhNubah}(h]h ]j}ah"]h$]h&]uh1jphj6ubj)}(hj h]h*}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj)}(httyh]htty}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj6ubah}(h]h ]h"]h$]h&]hhuh1jhj\6hhhjn6hM2ubeh}(h]h ]h"]h$]h&]hhj7uh1jXj8j9hjX6hhhjn6hM2ubah}(h]jS6ah ](j=j>eh"]h$]h&]jBjC)jDhuh1jRhjn6hM2hjU6hhubjF)}(hhh]h)}(hldisc cleanup for new ttyh]hldisc cleanup for new tty}(hj 7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM,hj7hhubah}(h]h ]h"]h$]h&]uh1jEhjU6hhhjn6hM2ubeh}(h]h ](jfunctioneh"]h$]h&]jfjjgj87jhj87jijjjkuh1jMhhhjhNhNubjm)}(h**Parameters** ``struct tty_struct *tty`` tty that was allocated recently **Description** The tty structure must not be completely set up (tty_ldisc_setup()) when this call is made.h](h)}(h**Parameters**h]jw)}(hjB7h]h Parameters}(hjD7hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj@7ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM0hj<7ubj)}(hhh]j)}(h;``struct tty_struct *tty`` tty that was allocated recently h](j)}(h``struct tty_struct *tty``h]j)}(hja7h]hstruct tty_struct *tty}(hjc7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_7ubah}(h]h ]h"]h$]h&]uh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM-hj[7ubj)}(hhh]h)}(htty that was allocated recentlyh]htty that was allocated recently}(hjz7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjv7hM-hjw7ubah}(h]h ]h"]h$]h&]uh1jhj[7ubeh}(h]h ]h"]h$]h&]uh1jhjv7hM-hjX7ubah}(h]h ]h"]h$]h&]uh1jhj<7ubh)}(h**Description**h]jw)}(hj7h]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jvhj7ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM/hj<7ubh)}(h[The tty structure must not be completely set up (tty_ldisc_setup()) when this call is made.h]h[The tty structure must not be completely set up (tty_ldisc_setup()) when this call is made.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/tty/tty_ldisc:84: ./drivers/tty/tty_ldisc.chM/hj<7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jlhjhhhNhNubeh}(h]jah ]h"]internal functionsah$]h&]uh1hhhhhhhhKRubeh}(h]tty-line-disciplineah ]h"]tty line disciplineah$]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_handlerj7error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _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}(j7j7jjjhjg jjsj2jjTj jvjjj7ju nametypes}(j7jjjg jsjj jj7uh}(j7hjhhjjKjTj3j8jjjjjjj2jj j j jTjvjvjjj j7j<jFjKjjjjj2j7jZj_jjj j j!#j&#jK%jP%j:'j?'jv)j{)j+j +j,j,j.j.j1j1j?3jD3j4j4jS6jX6hhj jj,j#jNjEjpjgjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j8KsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.