diff options
author | Christian Mauderer <Christian.Mauderer@embedded-brains.de> | 2014-03-27 14:23:21 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-27 14:50:36 +0100 |
commit | 5c0c0cf2a6a9e3fdbcd1ada3f79399c453b1fbd1 (patch) | |
tree | dba573cb48c77127b711bdce1f94816025fdf942 /cpukit/libcsupport/src/libio_init.c | |
parent | privateenv: Remove sharing of user environment between threads. (diff) | |
download | rtems-5c0c0cf2a6a9e3fdbcd1ada3f79399c453b1fbd1.tar.bz2 |
privateenv: Use POSIX keys instead of task variables.
Diffstat (limited to 'cpukit/libcsupport/src/libio_init.c')
-rw-r--r-- | cpukit/libcsupport/src/libio_init.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/libio_init.c b/cpukit/libcsupport/src/libio_init.c index 4d705fb8ee..e64ddd6e3a 100644 --- a/cpukit/libcsupport/src/libio_init.c +++ b/cpukit/libcsupport/src/libio_init.c @@ -46,6 +46,7 @@ void rtems_libio_init( void ) rtems_status_code rc; uint32_t i; rtems_libio_t *iop; + int eno; if (rtems_libio_number_iops > 0) { @@ -61,6 +62,17 @@ void rtems_libio_init( void ) } /* + * Create the posix key for user environment. + */ + eno = pthread_key_create( + &rtems_current_user_env_key, + rtems_libio_free_user_env + ); + if (eno != 0) { + rtems_fatal_error_occurred( RTEMS_UNSATISFIED ); + } + + /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ |