diff options
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/libcsupport/Makefile.am | 1 | ||||
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio.h | 15 | ||||
-rw-r--r-- | cpukit/libcsupport/src/libio_helper_null.c | 30 | ||||
-rw-r--r-- | cpukit/libcsupport/src/libio_init.c | 15 | ||||
-rw-r--r-- | cpukit/sapi/include/confdefs.h | 14 | ||||
-rw-r--r-- | cpukit/score/include/rtems/sysinit.h | 4 |
6 files changed, 16 insertions, 63 deletions
diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am index d223b1d78e..0b2607f2b9 100644 --- a/cpukit/libcsupport/Makefile.am +++ b/cpukit/libcsupport/Makefile.am @@ -41,7 +41,6 @@ ASSOCIATION_C_FILES = src/assoclocalbyname.c \ BASE_FS_C_FILES = src/base_fs.c src/mount.c src/unmount.c src/libio.c \ src/mount-mgr.c src/mount-mktgt.c src/libio_init.c \ src/privateenv.c \ - src/libio_helper_null.c \ src/libio_exit.c \ src/open_dev_console.c src/__usrenv.c src/rtems_mkdir.c BASE_FS_C_FILES += src/uenvgetgroups.c diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index 824fa2833d..a87031ca91 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -1338,13 +1338,6 @@ typedef struct { /** @} */ /** - * @brief RTEMS LibIO Initialization - * - * Called by BSP startup code to initialize the libio subsystem. - */ -void rtems_libio_init(void); - -/** * @name External I/O Handlers */ /**@{**/ @@ -1481,14 +1474,6 @@ static inline rtems_device_minor_number rtems_filesystem_dev_minor_t( */ void rtems_filesystem_initialize( void ); -typedef void (*rtems_libio_helper)(void); - -extern const rtems_libio_helper rtems_libio_init_helper; - -extern const rtems_libio_helper rtems_libio_post_driver_helper; - -void rtems_libio_helper_null(void); - void rtems_libio_post_driver(void); void rtems_libio_exit(void); diff --git a/cpukit/libcsupport/src/libio_helper_null.c b/cpukit/libcsupport/src/libio_helper_null.c deleted file mode 100644 index 947155fc85..0000000000 --- a/cpukit/libcsupport/src/libio_helper_null.c +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @file - * - * @ingroup LibIO - */ - -/* - * Copyright (c) 2013 embedded brains GmbH. All rights reserved. - * - * embedded brains GmbH - * Obere Lagerstr. 30 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#if HAVE_CONFIG_H - #include "config.h" -#endif - -#include <rtems/libio.h> - -void rtems_libio_helper_null(void) -{ - /* Do nothing */ -} diff --git a/cpukit/libcsupport/src/libio_init.c b/cpukit/libcsupport/src/libio_init.c index 88f5d8cef3..3ac2e3b67d 100644 --- a/cpukit/libcsupport/src/libio_init.c +++ b/cpukit/libcsupport/src/libio_init.c @@ -32,6 +32,7 @@ #include <stdlib.h> /* calloc() */ #include <rtems/libio.h> /* libio.h not pulled in by rtems */ +#include <rtems/sysinit.h> /* * File descriptor Table Information @@ -40,7 +41,7 @@ rtems_id rtems_libio_semaphore; rtems_libio_t *rtems_libio_iop_freelist; -void rtems_libio_init( void ) +static void rtems_libio_init( void ) { rtems_status_code rc; uint32_t i; @@ -81,3 +82,15 @@ void rtems_libio_init( void ) if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); } + +RTEMS_SYSINIT_ITEM( + rtems_libio_init, + RTEMS_SYSINIT_LIBIO, + RTEMS_SYSINIT_ORDER_MIDDLE +); + +RTEMS_SYSINIT_ITEM( + rtems_libio_post_driver, + RTEMS_SYSINIT_STD_FILE_DESCRIPTORS, + RTEMS_SYSINIT_ORDER_MIDDLE +); diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index 67616741b6..aa705e4c09 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -115,20 +115,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[]; #include <rtems/libio_.h> #ifdef CONFIGURE_INIT -const rtems_libio_helper rtems_libio_init_helper = - #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM - rtems_libio_helper_null; - #else - rtems_libio_init; - #endif - -const rtems_libio_helper rtems_libio_post_driver_helper = - #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM - rtems_libio_helper_null; - #else - rtems_libio_post_driver; - #endif - #ifndef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM RTEMS_SYSINIT_ITEM( rtems_filesystem_initialize, diff --git a/cpukit/score/include/rtems/sysinit.h b/cpukit/score/include/rtems/sysinit.h index 033ba871ed..178afd8ca3 100644 --- a/cpukit/score/include/rtems/sysinit.h +++ b/cpukit/score/include/rtems/sysinit.h @@ -56,12 +56,12 @@ extern "C" { #define RTEMS_SYSINIT_POSIX_CLEANUP 00036a #define RTEMS_SYSINIT_POSIX_KEYS 00036b #define RTEMS_SYSINIT_IDLE_THREADS 000380 -#define RTEMS_SYSINIT_BSP_LIBC 000400 +#define RTEMS_SYSINIT_LIBIO 000400 #define RTEMS_SYSINIT_ROOT_FILESYSTEM 000401 #define RTEMS_SYSINIT_BEFORE_DRIVERS 000500 #define RTEMS_SYSINIT_BSP_PRE_DRIVERS 000600 #define RTEMS_SYSINIT_DEVICE_DRIVERS 000700 -#define RTEMS_SYSINIT_BSP_POST_DRIVERS 000800 +#define RTEMS_SYSINIT_STD_FILE_DESCRIPTORS 000800 /* * The value of each order define must consist of exactly two hexadecimal |