summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/include/rtems/libio_.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2010-04-30 08:55:41 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2010-04-30 08:55:41 +0000
commit068a8240c67cb1dff6237c475828123dae0889c3 (patch)
tree0cfac94253076eb7a5167f21c9a527f16b5f88cb /cpukit/libcsupport/include/rtems/libio_.h
parent2010-04-30 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-068a8240c67cb1dff6237c475828123dae0889c3.tar.bz2
2010-04-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/include/rtems/libio_.h, libcsupport/src/envlock.c, libcsupport/src/libio.c: Added and use rtems_libio_lock() and rtems_libio_unlock(). Cleaned up includes and declarations. Do not use RTEMS_NO_PRIORITY for unused ceiling priority in rtems_semaphore_create().
Diffstat (limited to 'cpukit/libcsupport/include/rtems/libio_.h')
-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 7aada77622..27609023b5 100644
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ b/cpukit/libcsupport/include/rtems/libio_.h
@@ -204,6 +204,16 @@ extern rtems_user_env_t rtems_global_user_env;
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
+static inline void rtems_libio_lock( void )
+{
+ rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
+}
+
+static inline void rtems_libio_unlock( void )
+{
+ rtems_semaphore_release( rtems_libio_semaphore );
+}
+
/*
* File Descriptor Routine Prototypes
*/