I have code which does the following:
SharedVar = someVal;
var = SharedVar;
When I run the Intel Inspector to Locate Deadlocks and Data Races it says that there is read/write data race in accessing the presimably locked SharedVar. Does the Intel Inspector properly work with slim reader / writer locks or should I just discard the issue as a false positive?
Yes. I did initialize the lock. Also i have a test which will detect if a reader thread accesses not fully written data. The test has been running for a day with no issues.
I've also tried the sample from "Synchronization Primitives New To Windows Vista" (http://msdn.microsoft.com/en-us/magazine/cc163405.aspx). The Intel Inspector detects a race condition in that code too (in updateValue() and getValue()).