Changeset 4555bc1e in rtems


Ignore:
Timestamp:
Jul 17, 1998, 10:34:54 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
cce1200e
Parents:
4fb08fd
Message:

Initialized tty->refcount to 0. When (for whatever reason) malloc()
returned a buffer which was not zero-filled, the reference count
was not correct. When the application exitted, the "lastClose"
handler was not being called to flush the output. This problem
had manifested itself on a variety of platforms.

The function rtems_termios_dequeue_characters() incorrectly incremented
the buffer pointers when it was invoked and there were no characters
in the ring buffer. This problem had also manifested itself on a
variety of platforms. The symptom was a strange repeating of the
data in the transmitter buffer when the transmitter serial device
was supposed to go idle.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/termios.c

    r4fb08fd r4555bc1e  
    220220                tty->minor = minor;
    221221                tty->major = major;
     222                tty->refcount = 0;
    222223
    223224                /*
     
    923924        if (tty->rawOutBufState == rob_wait)
    924925                rtems_semaphore_release (tty->rawOutBufSemaphore);
     926        if ( tty->rawOutBufHead == tty->rawOutBufTail )
     927                return;
    925928        newTail = (tty->rawOutBufTail + len) % RAW_OUTPUT_BUFFER_SIZE;
    926929        if (newTail == tty->rawOutBufHead) {
  • c/src/lib/libc/termios.c

    r4fb08fd r4555bc1e  
    220220                tty->minor = minor;
    221221                tty->major = major;
     222                tty->refcount = 0;
    222223
    223224                /*
     
    923924        if (tty->rawOutBufState == rob_wait)
    924925                rtems_semaphore_release (tty->rawOutBufSemaphore);
     926        if ( tty->rawOutBufHead == tty->rawOutBufTail )
     927                return;
    925928        newTail = (tty->rawOutBufTail + len) % RAW_OUTPUT_BUFFER_SIZE;
    926929        if (newTail == tty->rawOutBufHead) {
  • cpukit/libcsupport/src/termios.c

    r4fb08fd r4555bc1e  
    220220                tty->minor = minor;
    221221                tty->major = major;
     222                tty->refcount = 0;
    222223
    223224                /*
     
    923924        if (tty->rawOutBufState == rob_wait)
    924925                rtems_semaphore_release (tty->rawOutBufSemaphore);
     926        if ( tty->rawOutBufHead == tty->rawOutBufTail )
     927                return;
    925928        newTail = (tty->rawOutBufTail + len) % RAW_OUTPUT_BUFFER_SIZE;
    926929        if (newTail == tty->rawOutBufHead) {
Note: See TracChangeset for help on using the changeset viewer.