Re: CE is not real-time?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Want to give us a hint as to what version of Windows CE you're talking about
and what processor? I don't see any measurement instrumentation to figure
out how long the call took. How are you measuring that?

Paul T.

"Frankie D." <FrankieD@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:03F7BFCF-A6A3-4454-8D53-8A7E503215C3@xxxxxxxxxxxxxxxx

Generally The execution of the following line is about 42 microsec:

(*(CommandsArray[0]))(NULL);

But first time the execution takes 1000 microsec!

I have rewrite this line an ASM , and I noticed that the secret latency is
"caused by the CALL command". (The function called by this line is empty.)

What happens? What is the magic? Is it a secret initialization? Memory
paging?
Secret exception? Is it the secret magic of the C++compiler?

Function pointer mustn't be used in real time programs?

The behaviour described above is fully deterministic.

The priority level of our thread is 2. And there is no higher task.

Definitions:

typedef void (__stdcall *CommandType)(CommandArg* ca);
CommandType CommandsArray[1000];

void InitCommandsArray()
{
CommandsArray[0] = &DoNothing;
}

void __stdcall DoNothing(CommandArg* ca) {}

CommandArg is class.

Please help!

Thx

Frankie


.