diff options
Diffstat (limited to 'dynamic-layers/selinux/android-tools/android-tools/libunwind-debian/legacy_built-in_sync_functions.patch')
-rw-r--r-- | dynamic-layers/selinux/android-tools/android-tools/libunwind-debian/legacy_built-in_sync_functions.patch | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools/libunwind-debian/legacy_built-in_sync_functions.patch b/dynamic-layers/selinux/android-tools/android-tools/libunwind-debian/legacy_built-in_sync_functions.patch deleted file mode 100644 index 8d78faa..0000000 --- a/dynamic-layers/selinux/android-tools/android-tools/libunwind-debian/legacy_built-in_sync_functions.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | Description: Replace the legacy __sync built-in functions with __atomic ones | ||
2 | libunwind uses the built-in __sync_* functions which are deprecated by GCC and | ||
3 | should be replaced by __atomic_* ones. See the official manuals [1]. | ||
4 | . | ||
5 | The legacy __sync functions do not require to specify the memory order but | ||
6 | __atomic ones do, so we choose the strongest one: __ATOMIC_SEQ_CST. | ||
7 | . | ||
8 | We do this because __sync_fetch_and_add() is not supported on armel. | ||
9 | . | ||
10 | [1]: https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html | ||
11 | Author: Kai-Chung Yan () | ||
12 | Last-Update: 2016-10-04 | ||
13 | --- a/include/libunwind_i.h | ||
14 | +++ b/include/libunwind_i.h | ||
15 | @@ -155,8 +155,8 @@ | ||
16 | u.vp = addr; | ||
17 | return __sync_bool_compare_and_swap(u.vlp, (long) old, (long) new); | ||
18 | } | ||
19 | -# define fetch_and_add1(_ptr) __sync_fetch_and_add(_ptr, 1) | ||
20 | -# define fetch_and_add(_ptr, value) __sync_fetch_and_add(_ptr, value) | ||
21 | +# define fetch_and_add1(_ptr) __atomic_fetch_add(_ptr, 1, __ATOMIC_SEQ_CST) | ||
22 | +# define fetch_and_add(_ptr, value) __atomic_fetch_add(_ptr, value, __ATOMIC_SEQ_CST) | ||
23 | # define HAVE_CMPXCHG | ||
24 | # define HAVE_FETCH_AND_ADD | ||
25 | #endif | ||