0
ˆ
ƒ›Áàä
Index of /FSS-BCZ/root/usr/include/libltdl
Index of /FSS-BCZ/root/usr/include/libltdl
ˆÆÅ
„�ŸÄà?÷ /* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_TTY_DRIVER_H
#define _LINUX_TTY_DRIVER_H
#include
#include
#include
#include
#include
#include
#include
struct tty_struct;
struct tty_driver;
struct serial_icounter_struct;
struct serial_struct;
/**
* struct tty_operations -- interface between driver and tty
*
* @lookup: ``struct tty_struct *()(struct tty_driver *self, struct file *,
* int idx)``
*
* Return the tty device corresponding to @idx, %NULL if there is not
* one currently in use and an %ERR_PTR value on error. Called under
* %tty_mutex (for now!)
*
* Optional method. Default behaviour is to use the @self->ttys array.
*
* @install: ``int ()(struct tty_driver *self, struct tty_struct *tty)``
*
* Install a new @tty into the @self's internal tables. Used in
* conjunction with @lookup and @remove methods.
*
* Optional method. Default behaviour is to use the @self->ttys array.
*
* @remove: ``void ()(struct tty_driver *self, struct tty_struct *tty)``
*
* Remove a closed @tty from the @self's internal tables. Used in
* conjunction with @lookup and @remove methods.
*
* Optional method. Default behaviour is to use the @self->ttys array.
*
* @open: ``int ()(struct tty_struct *tty, struct file *)``
*
* This routine is called when a particular @tty device is opened. This
* routine is mandatory; if this routine is not filled in, the attempted
* open will fail with %ENODEV.
*
* Required method. Called with tty lock held. May sleep.
*
* @close: ``void ()(struct tty_struct *tty, struct file *)``
*
* This routine is called when a particular @tty device is closed. At the
* point of return from this call the driver must make no further ldisc
* calls of any kind.
*
* Remark: called even if the corresponding @open() failed.
*
* Required method. Called with tty lock held. May sleep.
*
* @shutdown: ``void ()(struct tty_struct *tty)``
*
* This routine is called under the tty lock when a particular @tty device
* is closed for the last time. It executes before the @tty resources
* are freed so may execute while another function holds a @tty kref.
*
* @cleanup: ``void ()(struct tty_struct *tty)``
*
* This routine is called asynchronously when a particular @tty device
* is closed for the last time freeing up the resources. This is
* actually the second part of shutdown for routines that might sleep.
*
* @write: ``ssize_t ()(struct tty_struct *tty, const u8 *buf, size_t count)``
*
* This routine is called by the kernel to write a series (@count) of
* characters (@buf) to the @tty device. The characters may come from
* user space or kernel space. This routine will return