diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-14 15:21:14 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-15 10:55:38 +0200 |
commit | ac741625b0926a0329627beca52174edd69e587b (patch) | |
tree | f8f186efe3118359ae32a4a2eeedbe79e38c340e /cpukit/libcsupport/src/libio_init.c | |
parent | libio: Add hold/drop iop reference (diff) | |
download | rtems-ac741625b0926a0329627beca52174edd69e587b.tar.bz2 |
libio: Use FIFO for iop free list
Update #3136.
Diffstat (limited to 'cpukit/libcsupport/src/libio_init.c')
-rw-r--r-- | cpukit/libcsupport/src/libio_init.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cpukit/libcsupport/src/libio_init.c b/cpukit/libcsupport/src/libio_init.c index 3fa9e0995f..9c24b146ea 100644 --- a/cpukit/libcsupport/src/libio_init.c +++ b/cpukit/libcsupport/src/libio_init.c @@ -38,8 +38,11 @@ * File descriptor Table Information */ -rtems_id rtems_libio_semaphore; -rtems_libio_t *rtems_libio_iop_freelist; +rtems_id rtems_libio_semaphore; + +void *rtems_libio_iop_free_head; + +void **rtems_libio_iop_free_tail = &rtems_libio_iop_free_head; static void rtems_libio_init( void ) { @@ -50,10 +53,11 @@ static void rtems_libio_init( void ) if (rtems_libio_number_iops > 0) { - iop = rtems_libio_iop_freelist = &rtems_libio_iops[0]; + iop = rtems_libio_iop_free_head = &rtems_libio_iops[0]; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) iop->data1 = iop + 1; iop->data1 = NULL; + rtems_libio_iop_free_tail = &iop->data1; } /* |