• Aaryaman Sagar's avatar
    fetch_set and fetch_reset for single bit setting and resetting · 56768cc0
    Aaryaman Sagar authored
    Summary:
    lock bts and lock btr with the varying lengths turn out to be faster than
    a single CAS instruction
    
    fetch_set uses lock bts and fetch_reset uses lock btr when possible.
    std::atomic::fetch_or and std::atomic::fetch_and with a mask otherwise
    
    Reviewed By: yfeldblum
    
    Differential Revision: D9652759
    
    fbshipit-source-id: e6d10fdb119a10e15e32131c7389f1d4203a0d91
    56768cc0
CMakeLists.txt 29.8 KB