summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/include/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-13 10:35:45 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-15 10:27:12 +0200
commita937a5a5347cf945fe7eff17eccd97cc849a5349 (patch)
tree7eb9fbf30f59beef831d681afcb464b20fb76f7d /cpukit/libcsupport/include/rtems
parentlibio: Add rtems_libio_iop_is_no_delay() (diff)
downloadrtems-a937a5a5347cf945fe7eff17eccd97cc849a5349.tar.bz2
libio: Add rtems_libio_iop_is_readable()
Update #3132.
Diffstat (limited to 'cpukit/libcsupport/include/rtems')
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index 702ec352b9..7d85fb7af3 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -1390,6 +1390,16 @@ static inline bool rtems_libio_iop_is_no_delay( const rtems_libio_t *iop )
}
/**
+ * @brief Returns true if this is a readable iop, otherwise returns false.
+ *
+ * @param[in] iop The iop.
+ */
+static inline bool rtems_libio_iop_is_readable( const rtems_libio_t *iop )
+{
+ return ( rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_READ ) != 0;
+}
+
+/**
* @name External I/O Handlers
*/
/**@{**/