Global Variable getting corrupt between Tasks

Dear All,     I have declared a global variable which is upadted in one task, say TaskA & checking that variable in another task, say TaskB.

Global Variable getting corrupt between Tasks

You need to declare static volatile Yours sincerely Robert