• Dave Watson's avatar
    Allow stealing pointer bits · 763b84fb
    Dave Watson authored
    Summary:
    Currently hazard pointers doesn't support stealing any of the pointer bits.
    You can *almost* roll it yourself using try_protect, but this prevents
    implementations from choosing their type of barrier.
    
    This adds a new get_protected interface that you can use to steal bits, or
    otherwise manipulate pointers as you would like.
    
    This also adds a MWMR list based set example that uses it, that is wait-free
    for readers (unlike the SWMR example, that is only lock-free).
    
    Reviewed By: magedm
    
    Differential Revision: D5455615
    
    fbshipit-source-id: 53d282eda433e00b6b53cd804d4e1c32c74c2fb8
    763b84fb
HazptrTest.cpp 9.37 KB