summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-02 15:25:26 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-04 14:03:49 +0100
commitefd2965abf0beaa66e918107be0b667f086d6ea4 (patch)
tree6a1e3ede9f234980b4c28f804916d37c37e7b11c /cpukit/libcsupport
parentFilesystem: Use rtems_libio_iop_to_descriptor() (diff)
downloadrtems-efd2965abf0beaa66e918107be0b667f086d6ea4.tar.bz2
Filesystem: Statically initialize rtems_libio_iops
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r--cpukit/libcsupport/include/rtems/libio_.h2
-rw-r--r--cpukit/libcsupport/src/libio_init.c8
2 files changed, 2 insertions, 8 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h
index 1300d39b41..c26782e015 100644
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ b/cpukit/libcsupport/include/rtems/libio_.h
@@ -65,7 +65,7 @@ extern rtems_id rtems_libio_semaphore;
*/
extern const uint32_t rtems_libio_number_iops;
-extern rtems_libio_t *rtems_libio_iops;
+extern rtems_libio_t rtems_libio_iops[];
extern rtems_libio_t *rtems_libio_iop_freelist;
extern const rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers;
diff --git a/cpukit/libcsupport/src/libio_init.c b/cpukit/libcsupport/src/libio_init.c
index e64ddd6e3a..a14fe866f0 100644
--- a/cpukit/libcsupport/src/libio_init.c
+++ b/cpukit/libcsupport/src/libio_init.c
@@ -38,7 +38,6 @@
*/
rtems_id rtems_libio_semaphore;
-rtems_libio_t *rtems_libio_iops;
rtems_libio_t *rtems_libio_iop_freelist;
void rtems_libio_init( void )
@@ -50,12 +49,7 @@ void rtems_libio_init( void )
if (rtems_libio_number_iops > 0)
{
- rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
- sizeof(rtems_libio_t));
- if (rtems_libio_iops == NULL)
- rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
-
- iop = rtems_libio_iop_freelist = rtems_libio_iops;
+ iop = rtems_libio_iop_freelist = &rtems_libio_iops[0];
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
iop->data1 = iop + 1;
iop->data1 = NULL;