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
Line 
1/**
2 * @file
3 *
4 * @brief Initialization of Device Drivers
5 *
6 * @ingroup ClassicIO
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2008.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.org/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include <rtems/io.h>
23
24int _IO_Manager_drivers_inititalized = 0;
25
26void _IO_Initialize_all_drivers( void )
27{
28   rtems_device_major_number major;
29
30   _IO_Manager_drivers_inititalized = 1;
31
32   for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
33     (void) rtems_io_initialize( major, 0, NULL );
34}
Note: See TracBrowser for help on using the repository browser.