commit | addaebccf63a8c9f7c7a62ce1ceb9da4307c5a1c | [log] [tgz] |
---|---|---|
author | Peter Hurley <peter@hurleysoftware.com> | Sat Jun 15 10:04:22 2013 -0400 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Tue Jul 23 17:02:21 2013 -0700 |
tree | dfce21ff8b94fab6fbe53da5046d4c56ca072f32 | |
parent | ae56f3304107f70e26a389d845db76d6b949c114 [diff] |
n_tty: Use separate head and tail indices for echo_buf Instead of using a single index to track the current echo_buf position, use a head index when adding to the buffer and a tail index when consuming from the buffer. Allow these head and tail indices to wrap at max representable value; perform modulo reduction via helper functions when accessing the buffer. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>