Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[mempool] A new (atomic) way to deal with data races #5255
While slowly discovering all the secrets of Mono, I also discovered atomic.h which provides extremely useful functions to deal with a ton of Mono's currently known data races. I know, only recently did I ask to blacklist the reporting counter races in mempool.c (#5191). However, having atomic.h at hand, I think it's way better to fix the races (lock-free) than simply blacklisting them (and their surroundings)?
In addition, I added
As soon as these
I have also talked to the maintainers of TSan (I originally asked about the blacklisting of variables) and they seem really dedicated to finding solutions for ALL races ( https://groups.google.com/forum/#!topic/thread-sanitizer/ZfB_Q5xA790 ). When I told them about the general issue of atomic counters in combination with performance-critical code (like the one we have in mempool), Dmitry proposed a C++ solution -