summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-13 10:24:25 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-15 10:27:12 +0200
commitbbcdc302cd901e11b5c43527b91ffb5344669338 (patch)
treef0f01d8881258e89438582ef597ec00bdbb0b378 /cpukit/libcsupport
parentlibio: Add rtems_libio_iop_flags() (diff)
downloadrtems-bbcdc302cd901e11b5c43527b91ffb5344669338.tar.bz2
libio: Add rtems_libio_iop_is_no_delay()
Update #3132.
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h10
-rw-r--r--cpukit/libcsupport/src/termios.c2
2 files changed, 11 insertions, 1 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index 96d0c29d1e..702ec352b9 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -1380,6 +1380,16 @@ static inline uint32_t rtems_libio_iop_flags( const rtems_libio_t *iop )
}
/**
+ * @brief Returns true if this is a no delay iop, otherwise returns false.
+ *
+ * @param[in] iop The iop.
+ */
+static inline bool rtems_libio_iop_is_no_delay( const rtems_libio_t *iop )
+{
+ return ( rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_NO_DELAY ) != 0;
+}
+
+/**
* @name External I/O Handlers
*/
/**@{**/
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
index c454e18470..7a114a74b9 100644
--- a/cpukit/libcsupport/src/termios.c
+++ b/cpukit/libcsupport/src/termios.c
@@ -1230,7 +1230,7 @@ static uint32_t
rtems_termios_write_tty (rtems_libio_t *iop, rtems_termios_tty *tty,
const char *buf, uint32_t len)
{
- bool wait = ((iop->flags & LIBIO_FLAGS_NO_DELAY) == 0);
+ bool wait = !rtems_libio_iop_is_no_delay (iop);
if (tty->termios.c_oflag & OPOST) {
uint32_t todo = len;