Domanda

I want to know if there is a possibility to get the value of the counter which is used for the TickCounter interrupt.

Purpose:

I want to know the current Tick and the value of this register.

So that I can evaluate this.

For example,

the tick is 12 and the register is 1526. So I can implement a Virtual Clock which use the Tick counter ( base 1ms) and the register so that I have a more precise Clock.

EDIT:

I found this implementation

> #ifndef CERT /*******************************************************************************
> *
> * tickGet - get the value of the kernel's tick counter
> *
> * This routine returns the current value of the tick counter.
> * This value is set to zero at startup, incremented by tickAnnounce(),
> * and can be changed using tickSet().
> *
> * RETURNS: The most recent tickSet() value, plus all tickAnnounce() calls since.
> *
> * SEE ALSO: tickSet(), tickAnnounce()
> * 
> * INTERNAL
> * There should be no need to lock interrupts on this one; the compiler should
> * only generate a read from one half of the UINT64 which means that the read
> * can never be interrupted.
> */
> 
> ULONG tickGet (void)
>     {
>     return (ULONG) (vxAbsTicks & 0xFFFFFFFFull);
>     }
> #endif /* !CERT */

But I can not access the vxAbsTicks value

È stato utile?

Soluzione

The simple and correct answer is to just call tickGet().

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top