static int initCount = 0;
int objInit(void)
{
int i;
/* Check for reentrancy */
TaskLock ();
i = initCount++;
TaskUnlock ();
if (i > 0)
{
while (!initialized)
TaskDelay (100);
return (OK);
}
......
}
initCount
应该声明变量volatile
吗?