diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-13 09:22:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-15 10:29:34 +0200 |
commit | baef823cd550449bfbcc36625b9571389d8ad1af (patch) | |
tree | 238c1952d23dc09d41ae99d186d0656f78ed857b /cpukit/libcsupport/src/libio.c | |
parent | libio: Unify readv() and writev() (diff) | |
download | rtems-baef823cd550449bfbcc36625b9571389d8ad1af.tar.bz2 |
libio: Add hold/drop iop reference
Check iop reference count in close() and return -1 with errno set to
EBUSY in case the file descriptor is still in use.
Update #3132.
Diffstat (limited to 'cpukit/libcsupport/src/libio.c')
-rw-r--r-- | cpukit/libcsupport/src/libio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cpukit/libcsupport/src/libio.c b/cpukit/libcsupport/src/libio.c index 0cc2b98c0b..26fa7b2f67 100644 --- a/cpukit/libcsupport/src/libio.c +++ b/cpukit/libcsupport/src/libio.c @@ -58,16 +58,16 @@ static const rtems_assoc_t status_flags_assoc[] = { { 0, 0, 0 }, }; -uint32_t rtems_libio_fcntl_flags( int fcntl_flags ) +unsigned int rtems_libio_fcntl_flags( int fcntl_flags ) { - uint32_t flags = 0; + unsigned int flags = 0; uint32_t access_modes; /* * Access mode is a small integer */ - access_modes = (uint32_t) (fcntl_flags & O_ACCMODE); + access_modes = (unsigned int) (fcntl_flags & O_ACCMODE); fcntl_flags &= ~O_ACCMODE; flags = rtems_assoc_local_by_remote( access_modes_assoc, access_modes ); @@ -75,7 +75,7 @@ uint32_t rtems_libio_fcntl_flags( int fcntl_flags ) * Everything else is single bits */ - flags |= rtems_assoc_local_by_remote_bitfield( + flags |= (unsigned int ) rtems_assoc_local_by_remote_bitfield( status_flags_assoc, (uint32_t) fcntl_flags ); @@ -83,7 +83,7 @@ uint32_t rtems_libio_fcntl_flags( int fcntl_flags ) return flags; } -int rtems_libio_to_fcntl_flags( uint32_t flags ) +int rtems_libio_to_fcntl_flags( unsigned int flags ) { int fcntl_flags = 0; |