From 3cffd66d763ec83de382e2cb03c04e2eba0ac5e9 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 13 Sep 2017 10:36:11 +0200 Subject: libio: Add rtems_libio_iop_is_writeable() Update #3132. --- cpukit/libcsupport/include/rtems/libio.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cpukit/libcsupport') diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index 7d85fb7af3..72a787eebc 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -1399,6 +1399,16 @@ static inline bool rtems_libio_iop_is_readable( const rtems_libio_t *iop ) return ( rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_READ ) != 0; } +/** + * @brief Returns true if this is a writeable iop, otherwise returns false. + * + * @param[in] iop The iop. + */ +static inline bool rtems_libio_iop_is_writeable( const rtems_libio_t *iop ) +{ + return ( rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_WRITE ) != 0; +} + /** * @name External I/O Handlers */ -- cgit v1.2.3