summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-08-04 17:21:03 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-08-04 17:21:03 +0000
commit8e7a50ab42016b5de658f2323015a9d7ff863cf7 (patch)
tree0c6d8273f114ef0a97050cd14f75963cf667fd55
parent9c45222942942bd76cc6a5d1704349a7a0418493 (diff)
downloadglib-8e7a50ab42016b5de658f2323015a9d7ff863cf7.tar.gz
Always export g_atomic_int_get and g_atomic_pointer_get as functions, even
2005-08-04 Matthias Clasen <mclasen@redhat.com> * glib/glib.symbols: * glib/gatomic.[hc]: Always export g_atomic_int_get and g_atomic_pointer_get as functions, even if we have macros, to avoid changing the ABI depending on configuration. * glib/gatomic.c: Fix the s390 implementations of g_atomic_pointer_compare_and_exchange.
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.pre-2-1010
-rw-r--r--ChangeLog.pre-2-1210
-rw-r--r--ChangeLog.pre-2-810
-rw-r--r--glib/gatomic.c18
-rw-r--r--glib/gatomic.h4
-rw-r--r--glib/glib.symbols3
7 files changed, 60 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 2cc8fcced..d5fb2af88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-08-04 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/glib.symbols:
+ * glib/gatomic.[hc]: Always export g_atomic_int_get and
+ g_atomic_pointer_get as functions, even if we have macros,
+ to avoid changing the ABI depending on configuration.
+
+ * glib/gatomic.c: Fix the s390 implementations of
+ g_atomic_pointer_compare_and_exchange.
+
2005-08-04 Tor Lillqvist <tml@novell.com>
* glib/gstdio.h: Move the G_BEGIN_DECLS/G_END_DECLS pair outside
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 2cc8fcced..d5fb2af88 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,13 @@
+2005-08-04 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/glib.symbols:
+ * glib/gatomic.[hc]: Always export g_atomic_int_get and
+ g_atomic_pointer_get as functions, even if we have macros,
+ to avoid changing the ABI depending on configuration.
+
+ * glib/gatomic.c: Fix the s390 implementations of
+ g_atomic_pointer_compare_and_exchange.
+
2005-08-04 Tor Lillqvist <tml@novell.com>
* glib/gstdio.h: Move the G_BEGIN_DECLS/G_END_DECLS pair outside
diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12
index 2cc8fcced..d5fb2af88 100644
--- a/ChangeLog.pre-2-12
+++ b/ChangeLog.pre-2-12
@@ -1,3 +1,13 @@
+2005-08-04 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/glib.symbols:
+ * glib/gatomic.[hc]: Always export g_atomic_int_get and
+ g_atomic_pointer_get as functions, even if we have macros,
+ to avoid changing the ABI depending on configuration.
+
+ * glib/gatomic.c: Fix the s390 implementations of
+ g_atomic_pointer_compare_and_exchange.
+
2005-08-04 Tor Lillqvist <tml@novell.com>
* glib/gstdio.h: Move the G_BEGIN_DECLS/G_END_DECLS pair outside
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 2cc8fcced..d5fb2af88 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,13 @@
+2005-08-04 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/glib.symbols:
+ * glib/gatomic.[hc]: Always export g_atomic_int_get and
+ g_atomic_pointer_get as functions, even if we have macros,
+ to avoid changing the ABI depending on configuration.
+
+ * glib/gatomic.c: Fix the s390 implementations of
+ g_atomic_pointer_compare_and_exchange.
+
2005-08-04 Tor Lillqvist <tml@novell.com>
* glib/gstdio.h: Move the G_BEGIN_DECLS/G_END_DECLS pair outside
diff --git a/glib/gatomic.c b/glib/gatomic.c
index ad1f163bc..eb9bec352 100644
--- a/glib/gatomic.c
+++ b/glib/gatomic.c
@@ -464,7 +464,7 @@ g_atomic_pointer_compare_and_exchange (gpointer *atomic,
__asm__ __volatile__ ("cs %0, %2, %1"
: "+d" (result), "=Q" (*(atomic))
: "d" (newval), "m" (*(atomic)) : "cc" );
- result == oldval;
+ return result == oldval;
}
# elif GLIB_SIZEOF_VOID_P == 8 /* 64-bit system */
gboolean
@@ -477,7 +477,7 @@ g_atomic_pointer_compare_and_exchange (gpointer *atomic,
__asm__ __volatile__ ("csg %0, %2, %1"
: "+d" (result), "=Q" (*a)
: "d" ((long)(newval)), "m" (*a) : "cc" );
- result == oldval;
+ return result == oldval;
}
# else /* What's that */
# error "Your system has an unsupported pointer size"
@@ -687,5 +687,19 @@ _g_atomic_thread_init (void)
#endif /* DEFINE_WITH_MUTEXES */
}
+#ifndef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED
+gint
+(g_atomic_int_get) (gint *atomic)
+{
+ return g_atomic_int_get (atomic);
+}
+
+gpointer
+(g_atomic_pointer_get) (gpointer *atomic)
+{
+ return g_atomic_pointer_get (atomic);
+}
+#endif /* G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */
+
#define __G_ATOMIC_C__
#include "galiasdef.c"
diff --git a/glib/gatomic.h b/glib/gatomic.h
index 069fc1743..4e050a2e7 100644
--- a/glib/gatomic.h
+++ b/glib/gatomic.h
@@ -45,10 +45,10 @@ gboolean g_atomic_pointer_compare_and_exchange (gpointer *atomic,
gpointer oldval,
gpointer newval);
-#ifdef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED
gint g_atomic_int_get (gint *atomic);
gpointer g_atomic_pointer_get (gpointer *atomic);
-#else /* !G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */
+
+#ifndef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED
# define g_atomic_int_get(atomic) (*(atomic))
# define g_atomic_pointer_get(atomic) (*(atomic))
#endif /* G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */
diff --git a/glib/glib.symbols b/glib/glib.symbols
index 38aeaa4c5..fcaa08c0e 100644
--- a/glib/glib.symbols
+++ b/glib/glib.symbols
@@ -82,7 +82,8 @@ g_atomic_int_add
g_atomic_int_compare_and_exchange
g_atomic_int_exchange_and_add
g_atomic_pointer_compare_and_exchange
-#ifdef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED
+#ifdef INCLUDE_INTERNAL_SYMBOLS
+ /* these are not internal, but we don't want to alias them */
g_atomic_int_get
g_atomic_pointer_get
#endif