From ac741625b0926a0329627beca52174edd69e587b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 14 Sep 2017 15:21:14 +0200 Subject: libio: Use FIFO for iop free list Update #3136. --- cpukit/libcsupport/src/libio_init.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'cpukit/libcsupport/src/libio_init.c') 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; } /* -- cgit v1.2.3