diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-11-30 13:23:58 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-11-30 13:23:58 +0000 |
commit | 42836e3f8589423c64f3a67aef1cb04cd86ebcba (patch) | |
tree | dafacefcb8d183e898dadcb23f167195769ad789 /cpukit | |
parent | Added defines for initialization of empty chains. (diff) | |
download | rtems-42836e3f8589423c64f3a67aef1cb04cd86ebcba.tar.bz2 |
Obtain output semaphore before drain output during close to prevent an infinite output drain loop
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/libcsupport/src/termios.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index c6ef061ac0..967bbcca98 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -31,6 +31,11 @@ 2009-11-30 Sebastian Huber <sebastian.huber@embedded-brains.de> + * libcsupport/src/termios.c: Obtain output semaphore before drain + output during close to prevent an infinite output drain loop. + +2009-11-30 Sebastian Huber <sebastian.huber@embedded-brains.de> + * rtems/include/rtems/rtems/timer.h: Added timer server control block Timer_server_Control. Removed _Timer_Server thread pointer. Added _Timer_server pointer to the default timer server control block. diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index 373ba4dc53..51f3ac8cce 100644 --- a/cpukit/libcsupport/src/termios.c +++ b/cpukit/libcsupport/src/termios.c @@ -374,6 +374,10 @@ rtems_termios_close (void *arg) /* * default: just flush output buffer */ + sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); + if (sc != RTEMS_SUCCESSFUL) { + rtems_fatal_error_occurred (sc); + } drainOutput (tty); } |