+2004-02-29 Sebastian Wilhelmi <seppi@seppi.de>
+
+ * configure.in, glib/gatomic.c, glib/gatomic.h: Moved the
+ assembler functions from gatomic.h to gatomic.c, which makes for
+ better maintainability. Also use gint instead of gint32 to be able
+ to use reference counting for ABI-fixed structures with
+ gint/guint.
+
+ * glib/gthread.h: Adapted accordingly.
+
+ * tests/atomic-test.c: Updated to test for G_MAXINT and G_MININT.
+
2003-02-28 Hans Breuer <hans@breuer.org>
* glib/glib.def : updated externals, including those
+2004-02-29 Sebastian Wilhelmi <seppi@seppi.de>
+
+ * configure.in, glib/gatomic.c, glib/gatomic.h: Moved the
+ assembler functions from gatomic.h to gatomic.c, which makes for
+ better maintainability. Also use gint instead of gint32 to be able
+ to use reference counting for ABI-fixed structures with
+ gint/guint.
+
+ * glib/gthread.h: Adapted accordingly.
+
+ * tests/atomic-test.c: Updated to test for G_MAXINT and G_MININT.
+
2003-02-28 Hans Breuer <hans@breuer.org>
* glib/glib.def : updated externals, including those
+2004-02-29 Sebastian Wilhelmi <seppi@seppi.de>
+
+ * configure.in, glib/gatomic.c, glib/gatomic.h: Moved the
+ assembler functions from gatomic.h to gatomic.c, which makes for
+ better maintainability. Also use gint instead of gint32 to be able
+ to use reference counting for ABI-fixed structures with
+ gint/guint.
+
+ * glib/gthread.h: Adapted accordingly.
+
+ * tests/atomic-test.c: Updated to test for G_MAXINT and G_MININT.
+
2003-02-28 Hans Breuer <hans@breuer.org>
* glib/glib.def : updated externals, including those
+2004-02-29 Sebastian Wilhelmi <seppi@seppi.de>
+
+ * configure.in, glib/gatomic.c, glib/gatomic.h: Moved the
+ assembler functions from gatomic.h to gatomic.c, which makes for
+ better maintainability. Also use gint instead of gint32 to be able
+ to use reference counting for ABI-fixed structures with
+ gint/guint.
+
+ * glib/gthread.h: Adapted accordingly.
+
+ * tests/atomic-test.c: Updated to test for G_MAXINT and G_MININT.
+
2003-02-28 Hans Breuer <hans@breuer.org>
* glib/glib.def : updated externals, including those
+2004-02-29 Sebastian Wilhelmi <seppi@seppi.de>
+
+ * configure.in, glib/gatomic.c, glib/gatomic.h: Moved the
+ assembler functions from gatomic.h to gatomic.c, which makes for
+ better maintainability. Also use gint instead of gint32 to be able
+ to use reference counting for ABI-fixed structures with
+ gint/guint.
+
+ * glib/gthread.h: Adapted accordingly.
+
+ * tests/atomic-test.c: Updated to test for G_MAXINT and G_MININT.
+
2003-02-28 Hans Breuer <hans@breuer.org>
* glib/glib.def : updated externals, including those
+2004-02-29 Sebastian Wilhelmi <seppi@seppi.de>
+
+ * configure.in, glib/gatomic.c, glib/gatomic.h: Moved the
+ assembler functions from gatomic.h to gatomic.c, which makes for
+ better maintainability. Also use gint instead of gint32 to be able
+ to use reference counting for ABI-fixed structures with
+ gint/guint.
+
+ * glib/gthread.h: Adapted accordingly.
+
+ * tests/atomic-test.c: Updated to test for G_MAXINT and G_MININT.
+
2003-02-28 Hans Breuer <hans@breuer.org>
* glib/glib.def : updated externals, including those
dnl *** g_atomic_* tests for gcc ***
dnl ********************************
-AC_MSG_CHECKING([whether to use inline assembler code for atomic operations])
+AC_MSG_CHECKING([whether to use assembler code for atomic operations])
if test x"$GCC" = xyes; then
case $host_cpu in
i386)
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT([none])
+ glib_memory_barrier_needed=no
;;
i?86)
AC_MSG_RESULT([i486])
- glib_atomic_inlined_implementation=I486
+ AC_DEFINE_UNQUOTED(G_ATOMIC_I486, 1,
+ [i486 atomic implementation])
+ glib_memory_barrier_needed=no
;;
sparc*)
SPARCV9_WARNING="Try to rerun configure with CFLAGS='-mcpu=v9',
: "=&r" (tmp1), "=&r" (tmp2) : "r" (&tmp3));
}]],
AC_MSG_RESULT([sparcv9])
- glib_atomic_inlined_implementation=SPARCV9,
+ AC_DEFINE_UNQUOTED(G_ATOMIC_SPARCV9, 1,
+ [sparcv9 atomic implementation]),
AC_MSG_RESULT([no])
AC_MSG_WARN([[$SPARCV9_WARNING]]))
+ glib_memory_barrier_needed=yes
;;
- alpha)
+ alpha*)
AC_MSG_RESULT([alpha])
- glib_atomic_inlined_implementation=ALPHA
+ AC_DEFINE_UNQUOTED(G_ATOMIC_ALPHA, 1,
+ [alpha atomic implementation])
+ glib_memory_barrier_needed=yes
;;
x86_64)
AC_MSG_RESULT([x86_64])
- glib_atomic_inlined_implementation=X86_64
- ;;
+ AC_DEFINE_UNQUOTED(G_ATOMIC_X86_64, 1,
+ [x86_64 atomic implementation])
+ glib_memory_barrier_needed=no
+ ;;
powerpc*)
AC_MSG_RESULT([powerpc])
- glib_atomic_inlined_implementation=POWERPC
+ AC_DEFINE_UNQUOTED(G_ATOMIC_POWERPC, 1,
+ [powerpc atomic implementation])
+ glib_memory_barrier_needed=yes
;;
ia64)
AC_MSG_RESULT([ia64])
- glib_atomic_inlined_implementation=IA64
+ AC_DEFINE_UNQUOTED(G_ATOMIC_IA64, 1,
+ [ia64 atomic implementation])
+ glib_memory_barrier_needed=yes
;;
*)
AC_MSG_RESULT([none])
- glib_atomic_inlined_implementation=NONE
+ glib_memory_barrier_needed=yes
;;
esac
fi
long dummy_long;
};
_______EOF
- if test x"$g_atomic_inlined_implementation" != x; then
+ if test x"$g_memory_barrier_needed" != xno; then
echo >>$outfile
- echo "#define G_ATOMIC_INLINED_IMPLEMENTATION_$g_atomic_inlined_implementation" >>$outfile
+ echo "#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1" >>$outfile
fi
echo >>$outfile
g_system_thread_sizeof="$glib_cv_sizeof_system_thread"
g_mutex_contents="$glib_cv_byte_contents_gmutex"
-g_atomic_inlined_implementation="$glib_atomic_inlined_implementation"
+g_memory_barrier_needed="$glib_memory_barrier_needed"
g_module_suffix="$glib_gmodule_suffix"
+2004-02-29 Sebastian Wilhelmi <seppi@seppi.de>
+
+ * glib/glib-overrides.txt, glib/glib-sections.txt,
+ glib/tmpl/atomic_operations.sgml: Updated according to code changes.
+
Sun Feb 29 02:35:00 2004 Sven Herzberg <herzi@gnome-de.org>
* glib/tmpl/limits.sgml: exchange non-existing G_MAX_DOUBLE for
# g_atomic
<FUNCTION>
-<NAME>g_atomic_int_get</NAME>
-<RETURNS>gint32</RETURNS>
-gint32 *atomic
-</FUNCTION>
-
-<FUNCTION>
-<NAME>g_atomic_int_exchange_and_add</NAME>
-<RETURNS>gint32</RETURNS>
-gint32 *atomic
-gint32 val
-</FUNCTION>
-
-<FUNCTION>
-<NAME>g_atomic_int_add</NAME>
-<RETURNS>void</RETURNS>
-gint32 *atomic
-gint32 val
-</FUNCTION>
-
-<FUNCTION>
-<NAME>g_atomic_int_compare_and_exchange</NAME>
-<RETURNS>gboolean</RETURNS>
-gint32 *atomic
-gint32 oldval
-gint32 newval
-</FUNCTION>
-
-<FUNCTION>
-<NAME>g_atomic_pointer_get</NAME>
-<RETURNS>gpointer</RETURNS>
-gpointer *atomic
-</FUNCTION>
-
-<FUNCTION>
-<NAME>g_atomic_pointer_compare_and_exchange</NAME>
-<RETURNS>gboolean</RETURNS>
-gpointer *atomic
-gpointer oldval
-gpointer newval
-</FUNCTION>
-
-<FUNCTION>
<NAME>g_atomic_int_inc</NAME>
<RETURNS>void</RETURNS>
-gint32 *atomic
+gint *atomic
</FUNCTION>
<FUNCTION>
<NAME>g_atomic_int_dec_and_test</NAME>
<RETURNS>gboolean</RETURNS>
-gint32 *atomic
+gint *atomic
</FUNCTION>
<STRUCT>
g_atomic_int_dec_and_test
</SECTION>
-<SUBSECTION Private>
-g_atomic_int_add_fallback
-g_atomic_int_exchange_and_add_fallback
-g_atomic_int_compare_and_exchange_fallback
-g_atomic_pointer_compare_and_exchange_fallback
-
<SECTION>
<TITLE>IO Channels</TITLE>
<FILE>iochannels</FILE>
a memory barrier.
</para>
-@atomic: a pointer to a 32-bit integer.
+@atomic: a pointer to an integer.
@Returns: the value of *@atomic.
@Since: 2.4
Also acts as a memory barrier.
</para>
-@atomic: a pointer to a 32-bit integer.
+@atomic: a pointer to an integer.
@val: the value to add to *@atomic.
@Since: 2.4
Also acts as a memory barrier.
</para>
-@atomic: a pointer to a 32-bit integer.
+@atomic: a pointer to an integer.
@val: the value to add to *@atomic.
@Returns: the value of *@atomic before the addition.
@Since: 2.4
Also acts as a memory barrier.
</para>
-@atomic: a pointer to a 32-bit integer.
+@atomic: a pointer to an integer.
@oldval: the assumed old value of *@atomic.
@newval: the new value of *@atomic.
@Returns: %TRUE, if *@atomic was equal @oldval. %FALSE otherwise.
Atomically increments the integer pointed to by @atomic by 1.
</para>
-@atomic: a pointer to a 32-bit integer.
+@atomic: a pointer to an integer.
@Since: 2.4
Atomically decrements the integer pointed to by @atomic by 1.
</para>
-@atomic: a pointer to a 32-bit integer.
+@atomic: a pointer to an integer.
@Returns: %TRUE, if the integer pointed to by @atomic is 0 after
decrementing it.
@Since: 2.4