mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 09:17:29 +08:00
@@ -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
|
||||
|
||||
@@ -1337,13 +1337,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);
|
||||
|
||||
@@ -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 */
|
||||
}
|
||||
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user