diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-13 14:00:50 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-15 10:27:08 +0200 |
commit | ca90c6c1db3881ce5a44e06610a29a128e5455f2 (patch) | |
tree | f54ed2c4c10d7d73be307647553ca2f7971f6573 /cpukit/libcsupport/include/rtems/libio_.h | |
parent | libio: Add iop set/clear flags (diff) | |
download | rtems-ca90c6c1db3881ce5a44e06610a29a128e5455f2.tar.bz2 |
libio: Add rtems_libio_iop_flags_initialize()
Update #3132.
Diffstat (limited to 'cpukit/libcsupport/include/rtems/libio_.h')
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio_.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h index ed5cd27c31..0e128032ec 100644 --- a/cpukit/libcsupport/include/rtems/libio_.h +++ b/cpukit/libcsupport/include/rtems/libio_.h @@ -90,6 +90,24 @@ extern rtems_filesystem_mount_table_entry_t rtems_filesystem_null_mt_entry; extern rtems_filesystem_global_location_t rtems_filesystem_global_location_null; /** + * @brief Sets the iop flags to the specified flags together with + * LIBIO_FLAGS_OPEN. + * + * Use this once a file descriptor allocated via rtems_libio_allocate() is + * fully initialized. + * + * @param[in] iop The iop. + * @param[in] flags The flags. + */ +static inline void rtems_libio_iop_flags_initialize( + rtems_libio_t *iop, + uint32_t flags +) +{ + iop->flags = LIBIO_FLAGS_OPEN | flags; +} + +/** * @brief Sets the specified flags in the iop. * * @param[in] iop The iop. |