summaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt/selection.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-06-15 09:14:14 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-23 16:42:59 -0700
commitda261e7fe7b0e23a0d4d46039d20dc60fa197b49 (patch)
tree829f2d3cd05150f399b89460b1796afb64f9770d /drivers/tty/vt/selection.c
parent3b80df7ca7e2fec76be2eda304cc7e0eb90f911d (diff)
downloadop-kernel-dev-da261e7fe7b0e23a0d4d46039d20dc60fa197b49.zip
op-kernel-dev-da261e7fe7b0e23a0d4d46039d20dc60fa197b49.tar.gz
tty: Simplify tty buffer/ldisc interface with helper function
Ldisc interface functions must be called with interrupts enabled. Separating the ldisc calls into a helper function simplies the eventual removal of the spinlock. Note that access to the buf->head ptr outside the spinlock is safe here because; * __tty_buffer_flush() is prevented from running while buffer work performs i/o, * tty_buffer_find() only assigns buf->head if the flip buffer list is empty (which is never the case in flush_to_ldisc() since at least one buffer is always left in the list after use) Access to the read index outside the spinlock is safe here for the same reasons. Update the buffer's read index _after_ the data has been received by the ldisc. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt/selection.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud