Skip to content
Snippets Groups Projects
Commit b2b5513d authored by Howard Hinnant's avatar Howard Hinnant
Browse files

Changing <atomic> to follow Design A

llvm-svn: 116742
parent 0a5314fd
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
//===------------------------- atomic.cpp ---------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "__mutex_base"
#include "atomic"
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_VISIBLE
mutex&
__not_atomic_mut()
{
static mutex m;
return m;
}
_LIBCPP_END_NAMESPACE_STD
...@@ -79,18 +79,18 @@ type __atomic_exchange(type* atomic_obj, type desired, int mem_ord); ...@@ -79,18 +79,18 @@ type __atomic_exchange(type* atomic_obj, type desired, int mem_ord);
<font color="#C80000">// type must be trivially copyable</font> <font color="#C80000">// type must be trivially copyable</font>
<font color="#C80000">// Behavior is defined for mem_success = [0 ... 5],</font> <font color="#C80000">// Behavior is defined for mem_success = [0 ... 5],</font>
<font color="#C80000">// mem_falure &lt;= mem_success</font> <font color="#C80000">// mem_failure &lt;= mem_success</font>
<font color="#C80000">// mem_falure != 3</font> <font color="#C80000">// mem_failure != 3</font>
<font color="#C80000">// mem_falure != 4</font> <font color="#C80000">// mem_failure != 4</font>
bool __atomic_compare_exchange_strong(type* atomic_obj, bool __atomic_compare_exchange_strong(type* atomic_obj,
type* expected, type desired, type* expected, type desired,
int mem_success, int mem_failure); int mem_success, int mem_failure);
<font color="#C80000">// type must be trivially copyable</font> <font color="#C80000">// type must be trivially copyable</font>
<font color="#C80000">// Behavior is defined for mem_success = [0 ... 5],</font> <font color="#C80000">// Behavior is defined for mem_success = [0 ... 5],</font>
<font color="#C80000">// mem_falure &lt;= mem_success</font> <font color="#C80000">// mem_failure &lt;= mem_success</font>
<font color="#C80000">// mem_falure != 3</font> <font color="#C80000">// mem_failure != 3</font>
<font color="#C80000">// mem_falure != 4</font> <font color="#C80000">// mem_failure != 4</font>
bool __atomic_compare_exchange_weak(type* atomic_obj, bool __atomic_compare_exchange_weak(type* atomic_obj,
type* expected, type desired, type* expected, type desired,
int mem_success, int mem_failure); int mem_success, int mem_failure);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment