Ignore:
Timestamp:
Nov 4, 1999, 6:05:09 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
707f5c7
Parents:
d5704c6
Message:

The files in libcpu should not be directly dependent on any BSP. In
particular, using bsp.h, or getting information from the BSP which
should properly be obtained from RTEMS is forbidden. This is
necessary to strengthen the division between the BSP independent
parts of RTEMS and the BSPs themselves. This started after
comments and analysis by Ralf Corsepius <corsepiu@…>.
The changes primarily eliminated the need to include bsp.h and
peeking at BSP_Configuration. The use of Cpu_table in each
BSP needs to be eliminated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/hppa1.1/clock/clock.c

    rd5704c6 rf817b02  
    2020/* should get this from bsp.h, but it is not installed yet */
    2121rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int);
    22 extern rtems_configuration_table BSP_Configuration;
    2322
    2423#include <stdlib.h>                     /* for atexit() */
     
    104103    Clock_clicks = 0;
    105104
    106     Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
    107 
    108     if (BSP_Configuration.ticks_per_timeslice)
    109     {
     105    Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
     106
     107    if ( rtems_configuration_get_ticks_per_timeslice() ) {
    110108        /*
    111109         * initialize the interval here
     
    176174    {
    177175        rtems_clock_tick();
    178         Clock_isrs = BSP_Configuration.microseconds_per_tick / 10000;
     176        Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
    179177        if (Clock_isrs == 0)
    180178            Clock_isrs = 1;
     
    192190Clock_exit(void)
    193191{
    194     if ( BSP_Configuration.ticks_per_timeslice )
    195     {
     192    if ( rtems_configuration_get_ticks_per_timeslice() ) {
    196193        (void) set_vector(0, HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER, 1);
    197194    }
Note: See TracChangeset for help on using the changeset viewer.