Skip to content
  • Eric Fiselier's avatar
    [libcxx] Add atomic_support.h header to src that handles needed atomic operations. · 1faf289e
    Eric Fiselier authored
    Summary:
    In some places in libc++ we need to use the `__atomic_*` builtins. This patch adds a header that provides access to those builtins in a uniform way from within the dylib source.
    
    If the compiler building the dylib does not support these builtins then a warning is issued.
    
    Only relaxed loads are needed within the headers. A singe function to do these relaxed loads has been added to `<memory>`.
    
    This patch applies the new atomic builtins to `__shared_count` and `call_once`.
    
    Reviewers: mclow.lists
    
    Subscribers: majnemer, jroelofs, cfe-commits
    
    Differential Revision: http://reviews.llvm.org/D10406
    
    llvm-svn: 241532
    1faf289e
Loading