forked from Imagelibrary/rtems
Simplify _CPU_Counter_difference()
In order to simplify the use of CPU counter values it is beneficial to have monotonic increasing values within the range of the CPU counter ticks data type, e.g. 32-bit unsigned integer. This eases the use of CPU counter timestamps in external tools which do not know the details of the CPU counter hardware. The CPU counter is the fastest way to get a time on an RTEMS system. Such a CPU counter may be also used as the timecounter. Use it on SPARC for this purpose to simplify the clock drivers. Update #3456.
This commit is contained in:
@@ -333,6 +333,12 @@ extern rtems_interrupt_lock LEON3_IrqCtrl_Lock;
|
||||
#define LEON3_CLOCK_INDEX 0
|
||||
#endif
|
||||
|
||||
#if defined(RTEMS_SMP)
|
||||
#define LEON3_COUNTER_GPTIMER_INDEX (LEON3_CLOCK_INDEX + 1)
|
||||
#else
|
||||
#define LEON3_COUNTER_GPTIMER_INDEX LEON3_CLOCK_INDEX
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We assume that a boot loader (usually GRMON) initialized the GPTIMER 0 to
|
||||
* run with 1MHz. This is used to determine all clock frequencies of the PnP
|
||||
|
||||
Reference in New Issue
Block a user