Changeset 66d9e3ad in rtems


Ignore:
Timestamp:
Feb 21, 1996, 10:37:55 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
ba39113
Parents:
10017a72
Message:

Changed io manager initialization routine to not be static and added it here.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/sapi/src/io.c

    r10017a72 r66d9e3ad  
    1818#include <rtems/score/isr.h>
    1919#include <rtems/score/thread.h>
     20#include <rtems/score/wkspace.h>
    2021
    2122#include <string.h>
     23
     24/*PAGE
     25 *
     26 *  _IO_Manager_initialization
     27 *
     28 */
     29 
     30void _IO_Manager_initialization(
     31  rtems_driver_address_table *driver_table,
     32  unsigned32                  number_of_drivers,
     33  unsigned32                  number_of_devices
     34)
     35{
     36  void                *tmp;
     37  unsigned32           index;
     38  rtems_driver_name_t *np;
     39 
     40  _IO_Driver_address_table = driver_table;
     41  _IO_Number_of_drivers    = number_of_drivers;
     42  _IO_Number_of_devices    = number_of_devices;
     43 
     44  tmp = _Workspace_Allocate_or_fatal_error(
     45    sizeof( rtems_driver_name_t ) * ( number_of_devices + 1 )
     46  );
     47 
     48  _IO_Driver_name_table = (rtems_driver_name_t *) tmp;
     49 
     50  for( index=0, np = _IO_Driver_name_table ;
     51       index < _IO_Number_of_devices ;
     52       index++, np++ ) {
     53    np->device_name = 0;
     54    np->device_name_length = 0;
     55    np->major = 0;
     56    np->minor = 0;
     57  }
     58}
    2259
    2360/*PAGE
  • cpukit/sapi/src/io.c

    r10017a72 r66d9e3ad  
    1818#include <rtems/score/isr.h>
    1919#include <rtems/score/thread.h>
     20#include <rtems/score/wkspace.h>
    2021
    2122#include <string.h>
     23
     24/*PAGE
     25 *
     26 *  _IO_Manager_initialization
     27 *
     28 */
     29 
     30void _IO_Manager_initialization(
     31  rtems_driver_address_table *driver_table,
     32  unsigned32                  number_of_drivers,
     33  unsigned32                  number_of_devices
     34)
     35{
     36  void                *tmp;
     37  unsigned32           index;
     38  rtems_driver_name_t *np;
     39 
     40  _IO_Driver_address_table = driver_table;
     41  _IO_Number_of_drivers    = number_of_drivers;
     42  _IO_Number_of_devices    = number_of_devices;
     43 
     44  tmp = _Workspace_Allocate_or_fatal_error(
     45    sizeof( rtems_driver_name_t ) * ( number_of_devices + 1 )
     46  );
     47 
     48  _IO_Driver_name_table = (rtems_driver_name_t *) tmp;
     49 
     50  for( index=0, np = _IO_Driver_name_table ;
     51       index < _IO_Number_of_devices ;
     52       index++, np++ ) {
     53    np->device_name = 0;
     54    np->device_name_length = 0;
     55    np->major = 0;
     56    np->minor = 0;
     57  }
     58}
    2259
    2360/*PAGE
Note: See TracChangeset for help on using the changeset viewer.