AnsweredAssumed Answered

Accessing g_TickPeriod in VDK.c

Question asked by spflanze on Jun 21, 2012
Latest reply on Jun 26, 2012 by mohan

I am attempting to make timeout values passed to VDK_PendSemaphore() independent of the Kernel's tick period setting. So I have attempted to use the g_TickPeriod variable declared in VDK.cpp to automate calculating the number of ticks to pass to VDK_PendSemaphore(). I have trouble accessing the g_TickPeriod variable.

 

In the header file of the compilation unit I attempt to access it within I added the line:

extern float g_TickPeriod;

but the linker could not find g_TickPeriod and output an error.

 

Although I know that VDK.h will be overwritten when I make changes to the kernel, I tried adding that same external declaration to it. I got this compile time error:

[Error ea5004] ".\VDK.h":364 Syntax Error in :

extern float g_TickPeriod;

syntax error is at or near text 'float'.

I do not see what is wrong with this syntax. This same syntax compiled in the other header file where it got as far as the linker.

 

Is there a way to get access to g_TickPeriod?

Outcomes