In About Understanding Data Sharing Problems, you learned about the kinds of problems that can occur when tasks access the same memory locations. Two common strategies are used to deal with the following sharing problems:
Sharing problems involving a task and a memory location are incidental if the memory location does not carry information into or out of the task. Therefore, if you replace all uses of the shared memory location in the task with uses of some non-shared memory location, you eliminate the sharing problem without changing the behavior of the program.
Sharing is incidental only if the task writes to the memory location before any read of the memory location anywhere in the dynamic extent of the task. This is easy to check when the task is a few lines of code in a single function. It is much harder when the task is hundreds or thousands of lines of code, and involves calls to many functions in many source files.