Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
tty_flip.h File Reference

Go to the source code of this file.

Functions

int tty_buffer_request_room (struct tty_struct *tty, size_t size)
 
int tty_insert_flip_string_flags (struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size)
 
int tty_insert_flip_string_fixed_flag (struct tty_struct *tty, const unsigned char *chars, char flag, size_t size)
 
int tty_prepare_flip_string (struct tty_struct *tty, unsigned char **chars, size_t size)
 
int tty_prepare_flip_string_flags (struct tty_struct *tty, unsigned char **chars, char **flags, size_t size)
 
void tty_schedule_flip (struct tty_struct *tty)
 

Function Documentation

int tty_buffer_request_room ( struct tty_struct tty,
size_t  size 
)

tty_buffer_request_room - grow tty buffer if needed : tty structure : size desired

Make at least size bytes of linear space available for the tty buffer. If we fail return the size we managed to find.

Locking: Takes tty->buf.lock

Definition at line 236 of file tty_buffer.c.

int tty_insert_flip_string_fixed_flag ( struct tty_struct tty,
const unsigned char chars,
char  flag,
size_t  size 
)

tty_insert_flip_string_fixed_flag - Add characters to the tty buffer : tty structure : characters : flag value for each character : size

Queue a series of bytes to the tty buffering. All the characters passed are marked with the supplied flag. Returns the number added.

Locking: Called functions may take tty->buf.lock

Definition at line 261 of file tty_buffer.c.

int tty_insert_flip_string_flags ( struct tty_struct tty,
const unsigned char chars,
const char flags,
size_t  size 
)

tty_insert_flip_string_flags - Add characters to the tty buffer : tty structure : characters : flag bytes : size

Queue a series of bytes to the tty buffering. For each character the flags array indicates the status of the character. Returns the number added.

Locking: Called functions may take tty->buf.lock

Definition at line 306 of file tty_buffer.c.

int tty_prepare_flip_string ( struct tty_struct tty,
unsigned char **  chars,
size_t  size 
)

tty_prepare_flip_string - make room for characters : tty : return pointer for character write area : desired size

Prepare a block of space in the buffer for data. Returns the length available and buffer pointer to the space which is now allocated and accounted for as ready for normal characters. This is used for drivers that need their own block copy routines into the buffer. There is no guarantee the buffer is a DMA target!

Locking: May call functions taking tty->buf.lock

Definition at line 375 of file tty_buffer.c.

int tty_prepare_flip_string_flags ( struct tty_struct tty,
unsigned char **  chars,
char **  flags,
size_t  size 
)

tty_prepare_flip_string_flags - make room for characters : tty : return pointer for character write area : return pointer for status flag write area : desired size

Prepare a block of space in the buffer for data. Returns the length available and buffer pointer to the space which is now allocated and accounted for as ready for characters. This is used for drivers that need their own block copy routines into the buffer. There is no guarantee the buffer is a DMA target!

Locking: May call functions taking tty->buf.lock

Definition at line 412 of file tty_buffer.c.

void tty_schedule_flip ( struct tty_struct tty)

tty_schedule_flip - push characters to ldisc : tty to push from

Takes any pending buffers and transfers their ownership to the ldisc side of the queue. It then schedules those characters for processing by the line discipline.

Locking: Takes tty->buf.lock

Definition at line 349 of file tty_buffer.c.