summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/hppa1.1/clock/clock.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-04 18:05:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-04 18:05:09 +0000
commitf817b0283cce904d0bcb48cf9e641c2b40ba8f38 (patch)
treef8d686387ff9cf0639e38887ad23aef46e57db94 /c/src/lib/libcpu/hppa1.1/clock/clock.c
parentAdded first stab at mkgnatnewlib. (diff)
downloadrtems-f817b0283cce904d0bcb48cf9e641c2b40ba8f38.tar.bz2
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@faw.uni-ulm.de>. 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.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libcpu/hppa1.1/clock/clock.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/c/src/lib/libcpu/hppa1.1/clock/clock.c b/c/src/lib/libcpu/hppa1.1/clock/clock.c
index 1dcfa665ec..a0588e57fd 100644
--- a/c/src/lib/libcpu/hppa1.1/clock/clock.c
+++ b/c/src/lib/libcpu/hppa1.1/clock/clock.c
@@ -19,7 +19,6 @@
/* should get this from bsp.h, but it is not installed yet */
rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int);
-extern rtems_configuration_table BSP_Configuration;
#include <stdlib.h> /* for atexit() */
@@ -103,10 +102,9 @@ void Install_clock(rtems_isr_entry clock_isr)
Clock_clicks_interrupt = 0;
Clock_clicks = 0;
- Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
+ Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
- if (BSP_Configuration.ticks_per_timeslice)
- {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
/*
* initialize the interval here
* First tick is set to right amount of time in the future
@@ -175,7 +173,7 @@ Clock_isr(rtems_vector_number vector)
if (Clock_isrs == 1)
{
rtems_clock_tick();
- Clock_isrs = BSP_Configuration.microseconds_per_tick / 10000;
+ Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
if (Clock_isrs == 0)
Clock_isrs = 1;
}
@@ -191,8 +189,7 @@ Clock_isr(rtems_vector_number vector)
void
Clock_exit(void)
{
- if ( BSP_Configuration.ticks_per_timeslice )
- {
+ if ( rtems_configuration_get_ticks_per_timeslice() ) {
(void) set_vector(0, HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER, 1);
}
}