History

tty: extract tty_flip_buffer_commit() from tty_flip_buffer_push()

We will need this new helper in the next patch.

Jiri Slaby committed 4 years ago

Commit 716b1051 parent b941e481 file · +10 −5Browse files

Unified · Split

drivers/tty/tty_buffer.c+10−5
@@ -532,6 +532,15 @@ static void flush_to_ldisc(struct work_struct *work) · 531 unmodified lines
532 532
533}533}
534 534
535static inline void tty_flip_buffer_commit(struct tty_buffer *tail)
536{
537 /*
538 * Paired w/ acquire in flush_to_ldisc(); ensures flush_to_ldisc() sees
539 * buffer data.
540 */
541 smp_store_release(&tail->commit, tail->used);
542}
543
535/**544/**
536 * tty_flip_buffer_push - push terminal buffers545 * tty_flip_buffer_push - push terminal buffers
537 * @port: tty port to push546 * @port: tty port to push
@@ -546,11 +555,7 @@ void tty_flip_buffer_push(struct tty_port *port) · 8 unmodified lines
546{555{
547 struct tty_bufhead *buf = &port->buf;556 struct tty_bufhead *buf = &port->buf;
548 557
549 /*558 tty_flip_buffer_commit(buf->tail);
550 * Paired w/ acquire in flush_to_ldisc(); ensures flush_to_ldisc() sees
551 * buffer data.
552 */
553 smp_store_release(&buf->tail->commit, buf->tail->used);
554 queue_work(system_unbound_wq, &buf->work);559 queue_work(system_unbound_wq, &buf->work);
555}560}
556EXPORT_SYMBOL(tty_flip_buffer_push);561EXPORT_SYMBOL(tty_flip_buffer_push);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t