From 068a8240c67cb1dff6237c475828123dae0889c3 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 30 Apr 2010 08:55:41 +0000 Subject: 2010-04-30 Sebastian Huber * 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(). --- cpukit/libcsupport/include/rtems/libio_.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cpukit/libcsupport/include/rtems/libio_.h') 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 */ -- cgit v1.2.3