summaryrefslogtreecommitdiffstats
path: root/c/src/exec/libcsupport
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec/libcsupport')
-rw-r--r--c/src/exec/libcsupport/src/termios.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/exec/libcsupport/src/termios.c b/c/src/exec/libcsupport/src/termios.c
index 2a3bfe4fd1..fef2fce5ae 100644
--- a/c/src/exec/libcsupport/src/termios.c
+++ b/c/src/exec/libcsupport/src/termios.c
@@ -219,6 +219,7 @@ rtems_termios_open (
tty->minor = minor;
tty->major = major;
+ tty->refcount = 0;
/*
* Set up mutex semaphores
@@ -922,6 +923,8 @@ rtems_termios_dequeue_characters (void *ttyp, int len)
if (tty->rawOutBufState == rob_wait)
rtems_semaphore_release (tty->rawOutBufSemaphore);
+ if ( tty->rawOutBufHead == tty->rawOutBufTail )
+ return;
newTail = (tty->rawOutBufTail + len) % RAW_OUTPUT_BUFFER_SIZE;
if (newTail == tty->rawOutBufHead) {
/*