diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-13 10:36:11 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-15 10:27:12 +0200 |
commit | 3cffd66d763ec83de382e2cb03c04e2eba0ac5e9 (patch) | |
tree | 19bacd70e9f1667422a6a0fa184dee468d690cd7 /cpukit/libcsupport/include/rtems/libio.h | |
parent | libio: Add rtems_libio_iop_is_readable() (diff) | |
download | rtems-3cffd66d763ec83de382e2cb03c04e2eba0ac5e9.tar.bz2 |
libio: Add rtems_libio_iop_is_writeable()
Update #3132.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ -1400,6 +1400,16 @@ static inline bool rtems_libio_iop_is_readable( const rtems_libio_t *iop ) } /** + * @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 */ /**@{**/ |