From 66d9e3ad29009780e56ab3392f63f2ce6b5b6430 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 21 Feb 1996 22:37:55 +0000 Subject: Changed io manager initialization routine to not be static and added it here. --- cpukit/sapi/src/io.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'cpukit') diff --git a/cpukit/sapi/src/io.c b/cpukit/sapi/src/io.c index 49c89b22dc..b326a96987 100644 --- a/cpukit/sapi/src/io.c +++ b/cpukit/sapi/src/io.c @@ -17,9 +17,46 @@ #include #include #include +#include #include +/*PAGE + * + * _IO_Manager_initialization + * + */ + +void _IO_Manager_initialization( + rtems_driver_address_table *driver_table, + unsigned32 number_of_drivers, + unsigned32 number_of_devices +) +{ + void *tmp; + unsigned32 index; + rtems_driver_name_t *np; + + _IO_Driver_address_table = driver_table; + _IO_Number_of_drivers = number_of_drivers; + _IO_Number_of_devices = number_of_devices; + + tmp = _Workspace_Allocate_or_fatal_error( + sizeof( rtems_driver_name_t ) * ( number_of_devices + 1 ) + ); + + _IO_Driver_name_table = (rtems_driver_name_t *) tmp; + + for( index=0, np = _IO_Driver_name_table ; + index < _IO_Number_of_devices ; + index++, np++ ) { + np->device_name = 0; + np->device_name_length = 0; + np->major = 0; + np->minor = 0; + } +} + /*PAGE * * _IO_Initialize_all_drivers -- cgit v1.2.3