blob: bcc06e05cde81d99deaeb0161803132b9ad7dcd4 [file] [log] [blame]
Andrew Geissler95ac1b82021-03-31 14:34:31 -05001From 9474655eb21d64519b293e780bb686976cbdb790 Mon Sep 17 00:00:00 2001
2From: Philip Withnall <pwithnall@endlessos.org>
3Date: Wed, 11 Nov 2020 18:38:36 +0000
4Subject: [PATCH 14/29] gatomic: Drop unnecessary volatile qualifiers from
5 macro variables
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Its not necessary and provides no thread safety guarantees.
11
12The `volatile` qualifiers on the function arguments have to be kept, as
13they are (unfortunately) part of the API.
14
15Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
16
17Helps: #600
18Upstream-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
23diff --git a/glib/gatomic.h b/glib/gatomic.h
24index 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--
552.30.1
56