forked from OSchip/llvm-project
32 lines
851 B
C++
32 lines
851 B
C++
// -*- C++ -*-
|
|
//===------------------------ __atomic_support -----------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef _LIBCPP___ATOMIC_SUPPORT
|
|
#define _LIBCPP___ATOMIC_SUPPORT
|
|
|
|
#include <__config>
|
|
|
|
template<typename T>
|
|
T __libcpp_sync_add_and_fetch(T *ptr, T value) {
|
|
return __sync_add_and_fetch(ptr, value);
|
|
}
|
|
|
|
template<typename T>
|
|
T __libcpp_sync_fetch_and_add(T *ptr, T value) {
|
|
return __sync_fetch_and_add(ptr, value);
|
|
}
|
|
|
|
template<typename T>
|
|
T __libcpp_sync_lock_test_and_set(T *ptr, T value) {
|
|
return __sync_lock_test_and_set(ptr, value);
|
|
}
|
|
|
|
#endif //_LIBCPP___ATOMIC_SUPPORT
|