• Leif Walsh's avatar
    changed to ANNOTATE_IGNORE_{READS,WRITES}_{BEGIN,END} · a1190947
    Leif Walsh authored
    DRD seems to prefer those annotations to
    DRD_IGNORE_VAR/DRD_STOP_IGNORING_VAR.
    
    Helgrind is stupid, and VALGRIND_HG_{DIS,EN}ABLE_CHECKING pairs
    bizarrely "reclaim" the memory location for the current thread when
    re-enabling checking.  So they probably aren't completely suitable for
    our purposes, but Helgrind provides no facility for doing what we want
    because it just wants to watch the world burn.  So we add a couple of
    Helgrind suppressions in addition.
    
    Also, added a cute RAII wrapper for reading a variable in a racy way.
    Writing can be done the same way if we only want to appease DRD, but
    because Helgrind does things on a memory location-basis and not a
    thread-basis, things get a little tricky.
    a1190947
toku_race_tools.h 7.68 KB