diff options
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch b/meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch new file mode 100644 index 0000000000..bcc06e05cd --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/0014-gatomic-Drop-unnecessary-volatile-qualifiers-from-ma.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 9474655eb21d64519b293e780bb686976cbdb790 Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Withnall <pwithnall@endlessos.org> | ||
3 | Date: Wed, 11 Nov 2020 18:38:36 +0000 | ||
4 | Subject: [PATCH 14/29] gatomic: Drop unnecessary volatile qualifiers from | ||
5 | macro variables | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | It’s not necessary and provides no thread safety guarantees. | ||
11 | |||
12 | The `volatile` qualifiers on the function arguments have to be kept, as | ||
13 | they are (unfortunately) part of the API. | ||
14 | |||
15 | Signed-off-by: Philip Withnall <pwithnall@endlessos.org> | ||
16 | |||
17 | Helps: #600 | ||
18 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719] | ||
19 | --- | ||
20 | glib/gatomic.h | 6 +++--- | ||
21 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
22 | |||
23 | diff --git a/glib/gatomic.h b/glib/gatomic.h | ||
24 | index bb1435c70..e6eccfada 100644 | ||
25 | --- a/glib/gatomic.h | ||
26 | +++ b/glib/gatomic.h | ||
27 | @@ -211,7 +211,7 @@ G_END_DECLS | ||
28 | })) | ||
29 | #define g_atomic_pointer_and(atomic, val) \ | ||
30 | (G_GNUC_EXTENSION ({ \ | ||
31 | - volatile gsize *gapa_atomic = (volatile gsize *) (atomic); \ | ||
32 | + gsize *gapa_atomic = (gsize *) (atomic); \ | ||
33 | G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ | ||
34 | G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \ | ||
35 | (void) (0 ? (gpointer) *(atomic) : NULL); \ | ||
36 | @@ -220,7 +220,7 @@ G_END_DECLS | ||
37 | })) | ||
38 | #define g_atomic_pointer_or(atomic, val) \ | ||
39 | (G_GNUC_EXTENSION ({ \ | ||
40 | - volatile gsize *gapo_atomic = (volatile gsize *) (atomic); \ | ||
41 | + gsize *gapo_atomic = (gsize *) (atomic); \ | ||
42 | G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ | ||
43 | G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \ | ||
44 | (void) (0 ? (gpointer) *(atomic) : NULL); \ | ||
45 | @@ -229,7 +229,7 @@ G_END_DECLS | ||
46 | })) | ||
47 | #define g_atomic_pointer_xor(atomic, val) \ | ||
48 | (G_GNUC_EXTENSION ({ \ | ||
49 | - volatile gsize *gapx_atomic = (volatile gsize *) (atomic); \ | ||
50 | + gsize *gapx_atomic = (gsize *) (atomic); \ | ||
51 | G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gpointer)); \ | ||
52 | G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gsize)); \ | ||
53 | (void) (0 ? (gpointer) *(atomic) : NULL); \ | ||
54 | -- | ||
55 | 2.30.1 | ||
56 | |||