• Yedidya Feldblum's avatar
    atomic_fetch_flip · aa68792c
    Yedidya Feldblum authored
    Summary:
    The flip operation, like the set and reset operations, are optimizable on x86-related architectures using the `btc` instruction, compared with `bts` and `btr` for set and reset operations.
    
    The optimization is done for gnu-like compilers. However, for MSVC, there is no interlocked intrinsic for `btc`, so the optimization is not done.
    
    Reviewed By: luciang
    
    Differential Revision: D32049844
    
    fbshipit-source-id: 5f60f8c4c534fb0ee41d76c5d766f96f7ff94892
    aa68792c
AtomicUtil-inl.h 14.3 KB