Changeset e7d06758 in rtems


Ignore:
Timestamp:
08/19/05 16:19:48 (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
cee7620
Parents:
71319f77
Message:

2005-08-19 Cedric Aubert <cedric_aubert@…>

PR 577/bsps

  • console.c: The console_close() method currently calls StopRemoteTx?() on all invocations. It should should be ok for last close only but not for any others. If you open a port multiple times, you only want to call StopRemoteTx?() only as part of the last close.
Location:
c/src/lib/libbsp/shared
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/ChangeLog

    r71319f77 re7d06758  
     12005-08-19      Cedric Aubert <cedric_aubert@yahoo.fr>
     2
     3        PR 577/bsps
     4        * console.c: The console_close() method currently calls StopRemoteTx()
     5        on all invocations. It should should be ok for last close only but
     6        not for any others. If you open a port multiple times, you only want
     7        to call StopRemoteTx() only as part of the last close.
     8
    192005-04-15      Jennifer Averett <jennifer.averett@oarcorp.com>
    210
  • c/src/lib/libbsp/shared/console.c

    r71319f77 re7d06758  
    129129  rtems_libio_open_close_args_t *args = arg;
    130130
    131   if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
    132         Console_Port_Tbl[minor].pDeviceFlow &&
    133         Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx) {
    134     Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx(minor);
     131  /* Get the tty refcount to determine if we need to do deviceStopRemoteTx.
     132   * Stop only if it's the last one opened.
     133   */
     134  if ( (current_tty->refcount == 1) ) {
     135    if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
     136          Console_Port_Tbl[minor].pDeviceFlow &&
     137          Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx) {
     138      Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx(minor);
     139    }
    135140  }
    136141
Note: See TracChangeset for help on using the changeset viewer.