Skip to content
Snippets Groups Projects
Commit 7245f812 authored by W. Eric Norum's avatar W. Eric Norum
Browse files

Arrange for compatability with compile-time and run-time linking.

parent ba37f17c
No related branches found
No related tags found
No related merge requests found
......@@ -51,9 +51,6 @@ void tzset(void);
int fileno(FILE *);
int main(int argc, char **argv);
rtems_interval rtemsTicksPerSecond;
double rtemsTicksPerSecond_double, rtemsTicksPerTwoSeconds_double;
static void
logReset (void)
{
......@@ -81,6 +78,8 @@ logReset (void)
static void
delayedPanic (const char *msg)
{
extern rtems_interval rtemsTicksPerSecond;
rtems_task_wake_after (rtemsTicksPerSecond);
rtems_panic (msg);
}
......@@ -421,13 +420,6 @@ Init (rtems_task_argument ignored)
rtems_status_code sc;
rtems_time_of_day now;
/*
* Get configuration
*/
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &rtemsTicksPerSecond);
rtemsTicksPerSecond_double = rtemsTicksPerSecond;
rtemsTicksPerTwoSeconds_double = rtemsTicksPerSecond_double * 2.0;
/*
* Explain why we're here
*/
......
......@@ -104,6 +104,9 @@ int epicsTime_localtime ( const time_t *clock, struct tm *result )
}
}
rtems_interval rtemsTicksPerSecond;
double rtemsTicksPerSecond_double, rtemsTicksPerTwoSeconds_double;
} // extern "C"
/*
......@@ -119,6 +122,11 @@ static int staticTimeRegister(void)
{
if (rtemsTicksPerSecond != 0)
osdTimeRegister();
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &rtemsTicksPerSecond);
rtemsTicksPerSecond_double = rtemsTicksPerSecond;
rtemsTicksPerTwoSeconds_double = rtemsTicksPerSecond_double * 2.0;
return 1;
}
static int done = staticTimeRegister();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment