forked from Imagelibrary/rtems
2005-08-19 Cedric Aubert <cedric_aubert@yahoo.fr>
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.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2005-08-19 Cedric Aubert <cedric_aubert@yahoo.fr>
|
||||
|
||||
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.
|
||||
|
||||
2004-12-10 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
PR 704/bsps.
|
||||
|
||||
@@ -128,10 +128,15 @@ rtems_device_driver console_close(
|
||||
{
|
||||
rtems_libio_open_close_args_t *args = arg;
|
||||
|
||||
if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx) {
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx(minor);
|
||||
/* Get the tty refcount to determine if we need to do deviceStopRemoteTx.
|
||||
* Stop only if it's the last one opened.
|
||||
*/
|
||||
if ( (current_tty->refcount == 1) ) {
|
||||
if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx) {
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx(minor);
|
||||
}
|
||||
}
|
||||
|
||||
return rtems_termios_close (arg);
|
||||
|
||||
Reference in New Issue
Block a user