Hi Niranjan,
In the multithreading library provided by CVI, there is one function that allows you to create thread safe variables. Variables that will be accessed by multiple threads. CVI takes care of the synchronization for you and you don't have to worry about declaring them globally.
There is a shipping example that shows how to create them and use them in a multithreaded program.
Check out the project in the folder /samples/utility/Threading/ThreadSafeVar
Regards,
Azucena
NI