source: rtems/cpukit/sapi/src/io.c @ 04cf2c5

4.115
Last change on this file since 04cf2c5 was 04cf2c5, checked in by Daniel Hellstrom <daniel@…>, on 11/24/11 at 15:54:28

IO_MANAGER: early dynamic driver registration

Adds the possibility to register drivers before the IO Manager has
completed the initialization. Sometimes the BSP may want to register
a driver dynamically early in the boot process.

  • Property mode set to 100644
File size: 689 bytes
RevLine 
[4c98a3e]1/**
2 * @file
3 *
4 * @brief Initialization of Device Drivers
[ac7d5ef0]5 *
[4c98a3e]6 * @ingroup ClassicIO
7 */
8
9/*
[790b50b]10 *  COPYRIGHT (c) 1989-2008.
[ac7d5ef0]11 *  On-Line Applications Research Corporation (OAR).
12 *
[98e4ebf5]13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
[c499856]15 *  http://www.rtems.org/license/LICENSE.
[ac7d5ef0]16 */
17
[16351f7a]18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
[ac7d5ef0]22#include <rtems/io.h>
[66d9e3ad]23
[04cf2c5]24int _IO_Manager_drivers_inititalized = 0;
25
[ac7d5ef0]26void _IO_Initialize_all_drivers( void )
27{
28   rtems_device_major_number major;
29
[04cf2c5]30   _IO_Manager_drivers_inititalized = 1;
31
[ac7d5ef0]32   for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
[eafa35e7]33     (void) rtems_io_initialize( major, 0, NULL );
[b06e68ef]34}
Note: See TracBrowser for help on using the repository browser.