annotate Resources/Patches/boost-1.55.0-clang-atomic.patch @ 1261:ef74281b2ffa

deploy
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 Jan 2015 15:45:20 +0100
parents 44f139b62108
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1096
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 --- boost/atomic/detail/cas128strong.hpp
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 +++ boost/atomic/detail/cas128strong.hpp
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 @@ -196,15 +196,17 @@ class base_atomic<T, void, 16, Sign>
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 public:
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 BOOST_DEFAULTED_FUNCTION(base_atomic(void), {})
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 - explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 + explicit base_atomic(value_type const& v) BOOST_NOEXCEPT
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 {
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 + memset(&v_, 0, sizeof(v_));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 memcpy(&v_, &v, sizeof(value_type));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 }
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 void
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 store(value_type const& value, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 {
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 - storage_type value_s = 0;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 + storage_type value_s;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 + memset(&value_s, 0, sizeof(value_s));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 memcpy(&value_s, &value, sizeof(value_type));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 platform_fence_before_store(order);
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 platform_store128(value_s, &v_);
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 @@ -247,7 +249,9 @@ class base_atomic<T, void, 16, Sign>
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 memory_order success_order,
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 memory_order failure_order) volatile BOOST_NOEXCEPT
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 {
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 - storage_type expected_s = 0, desired_s = 0;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 + storage_type expected_s, desired_s;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 + memset(&expected_s, 0, sizeof(expected_s));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 + memset(&desired_s, 0, sizeof(desired_s));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 memcpy(&expected_s, &expected, sizeof(value_type));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 memcpy(&desired_s, &desired, sizeof(value_type));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 --- boost/atomic/detail/gcc-atomic.hpp
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 +++ boost/atomic/detail/gcc-atomic.hpp
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 @@ -958,14 +958,16 @@ class base_atomic<T, void, 16, Sign>
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 public:
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 BOOST_DEFAULTED_FUNCTION(base_atomic(void), {})
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 - explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 + explicit base_atomic(value_type const& v) BOOST_NOEXCEPT
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 {
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 + memset(&v_, 0, sizeof(v_));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 memcpy(&v_, &v, sizeof(value_type));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 }
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 {
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 - storage_type tmp = 0;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 + storage_type tmp;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 + memset(&tmp, 0, sizeof(tmp));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 memcpy(&tmp, &v, sizeof(value_type));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 __atomic_store_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 }
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 @@ -980,7 +982,8 @@ class base_atomic<T, void, 16, Sign>
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 {
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 - storage_type tmp = 0;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 + storage_type tmp;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 + memset(&tmp, 0, sizeof(tmp));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 memcpy(&tmp, &v, sizeof(value_type));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 tmp = __atomic_exchange_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 value_type res;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 @@ -994,7 +997,9 @@ class base_atomic<T, void, 16, Sign>
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 memory_order success_order,
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 memory_order failure_order) volatile BOOST_NOEXCEPT
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 {
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 - storage_type expected_s = 0, desired_s = 0;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 + storage_type expected_s, desired_s;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 + memset(&expected_s, 0, sizeof(expected_s));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 + memset(&desired_s, 0, sizeof(desired_s));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 memcpy(&expected_s, &expected, sizeof(value_type));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 memcpy(&desired_s, &desired, sizeof(value_type));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, false,
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 @@ -1010,7 +1015,9 @@ class base_atomic<T, void, 16, Sign>
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 memory_order success_order,
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 memory_order failure_order) volatile BOOST_NOEXCEPT
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 {
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 - storage_type expected_s = 0, desired_s = 0;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 + storage_type expected_s, desired_s;
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 + memset(&expected_s, 0, sizeof(expected_s));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 + memset(&desired_s, 0, sizeof(desired_s));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 memcpy(&expected_s, &expected, sizeof(value_type));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 memcpy(&desired_s, &desired, sizeof(value_type));
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, true,
44f139b62108 patch for XCode 5.1
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 --