Ticket #500: Patch_rtems-4.6.0_cpukit_libcsupport_src_termios_c.diff

File Patch_rtems-4.6.0_cpukit_libcsupport_src_termios_c.diff, 1.4 KB (added by cedric_aubert, on 12/03/06 at 13:31:13)

Patch_rtems-4.6.0_cpukit_libcsupport_src_termios_c.diff

  • cpukit/libcsupport/src/termios.c

    old new fillBufferPoll (struct rtems_termios_tty 
    10391038static rtems_status_code
    10401039fillBufferQueue (struct rtems_termios_tty *tty)
    10411040{
     1041        rtems_interrupt_level level;
    10421042        rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
    10431043        rtems_status_code sc;
    10441044        int               wait = (int)1;
    fillBufferQueue (struct rtems_termios_tt 
    10471047                /*
    10481048                 * Process characters read from raw queue
    10491049                 */
    1050                 while (tty->rawInBuf.Head != tty->rawInBuf.Tail) {
     1050                while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) {
    10511051                        unsigned char c;
    10521052                        unsigned int newHead;
    10531053
    fillBufferQueue (struct rtems_termios_tt 
    10571057                        if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
    10581058                            % tty->rawInBuf.Size)
    10591059                           < tty->lowwater) {
     1060                          /* Disable interrupt to reset FL_IREQXOF and FL_IRTSOFF without been interrupted */
     1061                          rtems_interrupt_disable(level);
    10601062                          tty->flow_ctrl &= ~FL_IREQXOF;
    10611063                          /* if tx stopped and XON should be sent... */
    10621064                          if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
    fillBufferQueue (struct rtems_termios_tt 
    10751077                              tty->device.startRemoteTx(tty->minor);
    10761078                            }
    10771079                          }
     1080                          /* reenable interrupts */
     1081                          rtems_interrupt_enable(level);
    10781082                        }
    10791083
    10801084                        /* continue processing new character */