summaryrefslogtreecommitdiff
path: root/Documentation/driver-api/tty/tty_buffer.rst
blob: 4b5ca1776d4f11b299facf2fbeb76da3458175f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.. SPDX-License-Identifier: GPL-2.0

==========
TTY Buffer
==========

.. contents:: :local:

Here, we document functions for taking care of tty buffer and their flipping.
Drivers are supposed to fill the buffer by one of those functions below and
then flip the buffer, so that the data are passed to :doc:`line discipline
<tty_ldisc>` for further processing.

Flip Buffer Management
======================

.. kernel-doc:: drivers/tty/tty_buffer.c
   :identifiers: tty_prepare_flip_string
           tty_flip_buffer_push tty_ldisc_receive_buf

.. kernel-doc:: include/linux/tty_flip.h
   :identifiers: tty_insert_flip_string_fixed_flag tty_insert_flip_string_flags
           tty_insert_flip_char

----

Other Functions
===============

.. kernel-doc:: drivers/tty/tty_buffer.c
   :identifiers: tty_buffer_space_avail tty_buffer_set_limit

----

Buffer Locking
==============

These are used only in special circumstances. Avoid them.

.. kernel-doc:: drivers/tty/tty_buffer.c
   :identifiers: tty_buffer_lock_exclusive tty_buffer_unlock_exclusive

----

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

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