summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0001-Add-atomic_exchange_relaxed.patch
diff options
context:
space:
mode:
authorCatalin Enache <catalin.enache@windriver.com>2017-07-07 19:43:34 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-29 16:50:53 +0100
commite6955b7d0de1900bfc3c8e83a5a00b2604f10916 (patch)
tree778c38ead0535bf9e6676d589fab755567e8bf05 /meta/recipes-core/glibc/glibc/0001-Add-atomic_exchange_relaxed.patch
parent5b2a7393f98081946e30e311e7277d253f6ddd9a (diff)
downloadpoky-e6955b7d0de1900bfc3c8e83a5a00b2604f10916.tar.gz
glibc: fix pthread_cond_broadcast issue (arm)
pthread_mutex functions such as pthread_cond_wait(), pthread_mutex_unlock() return errors after PTHREAD_PRIO_INHERIT is enabled Reference: https://sourceware.org/bugzilla/show_bug.cgi?id=18463 Upstream patches: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=f0e3925bf3b8df6940c3346db17e42615979d458 https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=13cb8f76da9d9420330796f469dbf10643ba5b12 https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=23b5cae1af04f2d912910fdaf73cb482265798c1 https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=ed19993b5b0d05d62cc883571519a67dae481a14 https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2e4cf778972573221e9b87fd992844ea9b67b9bf https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=abff18c0c6055ca5d1cd46923fd1205c057139a5 This issue is Morty specific (glibc 2.24). The issue is no longer present in glibc 2.25 (master branch). (From OE-Core rev: 6dc1f1c3cc871d00ecd59d5aeeef86b7e6965750) Signed-off-by: Catalin Enache <catalin.enache@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0001-Add-atomic_exchange_relaxed.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/0001-Add-atomic_exchange_relaxed.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0001-Add-atomic_exchange_relaxed.patch b/meta/recipes-core/glibc/glibc/0001-Add-atomic_exchange_relaxed.patch
new file mode 100644
index 0000000000..a33a135f78
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0001-Add-atomic_exchange_relaxed.patch
@@ -0,0 +1,58 @@
1From ce74a620bf9e1a40b7ba06d35160e20633a4d8bb Mon Sep 17 00:00:00 2001
2From: Catalin Enache <catalin.enache@windriver.com>
3Date: Fri, 7 Jul 2017 13:11:16 +0300
4Subject: [PATCH 1/6] Add atomic_exchange_relaxed.
5
6* include/atomic.h (atomic_exchange_relaxed): New
7
8Upstream-Status: Backport
9
10Author: Torvald Riegel <triegel@redhat.com>
11Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
12---
13 ChangeLog | 4 ++++
14 include/atomic.h | 9 +++++++++
15 2 files changed, 13 insertions(+)
16
17diff --git a/ChangeLog b/ChangeLog
18index 0fbda90..cb87279 100644
19--- a/ChangeLog
20+++ b/ChangeLog
21@@ -1,3 +1,7 @@
22+2016-08-05 Torvald Riegel <triegel@redhat.com>
23+
24+ * include/atomic.h (atomic_exchange_relaxed): New.
25+
26 2016-01-28 Carlos O'Donell <carlos@redhat.com>
27 Alexey Makhalov <amakhalov@vmware.com>
28 Florian Weimer <fweimer@redhat.com>
29diff --git a/include/atomic.h b/include/atomic.h
30index ad3db25..129ee24 100644
31--- a/include/atomic.h
32+++ b/include/atomic.h
33@@ -588,6 +588,9 @@ void __atomic_link_error (void);
34 __atomic_compare_exchange_n ((mem), (expected), (desired), 1, \
35 __ATOMIC_RELEASE, __ATOMIC_RELAXED); })
36
37+# define atomic_exchange_relaxed(mem, desired) \
38+ ({ __atomic_check_size((mem)); \
39+ __atomic_exchange_n ((mem), (desired), __ATOMIC_RELAXED); })
40 # define atomic_exchange_acquire(mem, desired) \
41 ({ __atomic_check_size((mem)); \
42 __atomic_exchange_n ((mem), (desired), __ATOMIC_ACQUIRE); })
43@@ -684,6 +687,12 @@ void __atomic_link_error (void);
44 *(expected) == __atg103_expected; })
45 # endif
46
47+/* XXX Fall back to acquire MO because archs do not define a weaker
48+ atomic_exchange. */
49+# ifndef atomic_exchange_relaxed
50+# define atomic_exchange_relaxed(mem, val) \
51+ atomic_exchange_acq ((mem), (val))
52+# endif
53 # ifndef atomic_exchange_acquire
54 # define atomic_exchange_acquire(mem, val) \
55 atomic_exchange_acq ((mem), (val))
56--
572.10.2
58