mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-23 15:49:16 +02:00
Moved the assembler functions from gatomic.h to gatomic.c, which makes for
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. * glib/glib-overrides.txt, glib/glib-sections.txt, glib/tmpl/atomic_operations.sgml: Updated according to code changes.
This commit is contained in:
parent
760d96edc5
commit
fe2efd06a0
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
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>
|
2003-02-28 Hans Breuer <hans@breuer.org>
|
||||||
|
|
||||||
* glib/glib.def : updated externals, including those
|
* glib/glib.def : updated externals, including those
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
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>
|
2003-02-28 Hans Breuer <hans@breuer.org>
|
||||||
|
|
||||||
* glib/glib.def : updated externals, including those
|
* glib/glib.def : updated externals, including those
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
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>
|
2003-02-28 Hans Breuer <hans@breuer.org>
|
||||||
|
|
||||||
* glib/glib.def : updated externals, including those
|
* glib/glib.def : updated externals, including those
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
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>
|
2003-02-28 Hans Breuer <hans@breuer.org>
|
||||||
|
|
||||||
* glib/glib.def : updated externals, including those
|
* glib/glib.def : updated externals, including those
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
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>
|
2003-02-28 Hans Breuer <hans@breuer.org>
|
||||||
|
|
||||||
* glib/glib.def : updated externals, including those
|
* glib/glib.def : updated externals, including those
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
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>
|
2003-02-28 Hans Breuer <hans@breuer.org>
|
||||||
|
|
||||||
* glib/glib.def : updated externals, including those
|
* glib/glib.def : updated externals, including those
|
||||||
|
41
configure.in
41
configure.in
@ -1818,16 +1818,19 @@ dnl ********************************
|
|||||||
dnl *** g_atomic_* tests for gcc ***
|
dnl *** g_atomic_* tests for gcc ***
|
||||||
dnl ********************************
|
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
|
if test x"$GCC" = xyes; then
|
||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
i386)
|
i386)
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([none])
|
||||||
|
glib_memory_barrier_needed=no
|
||||||
;;
|
;;
|
||||||
i?86)
|
i?86)
|
||||||
AC_MSG_RESULT([i486])
|
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*)
|
sparc*)
|
||||||
SPARCV9_WARNING="Try to rerun configure with CFLAGS='-mcpu=v9',
|
SPARCV9_WARNING="Try to rerun configure with CFLAGS='-mcpu=v9',
|
||||||
@ -1844,29 +1847,39 @@ if test x"$GCC" = xyes; then
|
|||||||
: "=&r" (tmp1), "=&r" (tmp2) : "r" (&tmp3));
|
: "=&r" (tmp1), "=&r" (tmp2) : "r" (&tmp3));
|
||||||
}]],
|
}]],
|
||||||
AC_MSG_RESULT([sparcv9])
|
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_RESULT([no])
|
||||||
AC_MSG_WARN([[$SPARCV9_WARNING]]))
|
AC_MSG_WARN([[$SPARCV9_WARNING]]))
|
||||||
|
glib_memory_barrier_needed=yes
|
||||||
;;
|
;;
|
||||||
alpha)
|
alpha*)
|
||||||
AC_MSG_RESULT([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)
|
x86_64)
|
||||||
AC_MSG_RESULT([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*)
|
powerpc*)
|
||||||
AC_MSG_RESULT([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)
|
ia64)
|
||||||
AC_MSG_RESULT([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])
|
AC_MSG_RESULT([none])
|
||||||
glib_atomic_inlined_implementation=NONE
|
glib_memory_barrier_needed=yes
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@ -2226,9 +2239,9 @@ union _GSystemThread
|
|||||||
long dummy_long;
|
long dummy_long;
|
||||||
};
|
};
|
||||||
_______EOF
|
_______EOF
|
||||||
if test x"$g_atomic_inlined_implementation" != x; then
|
if test x"$g_memory_barrier_needed" != xno; then
|
||||||
echo >>$outfile
|
echo >>$outfile
|
||||||
echo "#define G_ATOMIC_INLINED_IMPLEMENTATION_$g_atomic_inlined_implementation" >>$outfile
|
echo "#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1" >>$outfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo >>$outfile
|
echo >>$outfile
|
||||||
@ -2532,7 +2545,7 @@ g_mutex_sizeof="$glib_cv_sizeof_gmutex"
|
|||||||
g_system_thread_sizeof="$glib_cv_sizeof_system_thread"
|
g_system_thread_sizeof="$glib_cv_sizeof_system_thread"
|
||||||
g_mutex_contents="$glib_cv_byte_contents_gmutex"
|
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"
|
g_module_suffix="$glib_gmodule_suffix"
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
Sun Feb 29 02:35:00 2004 Sven Herzberg <herzi@gnome-de.org>
|
||||||
|
|
||||||
* glib/tmpl/limits.sgml: exchange non-existing G_MAX_DOUBLE for
|
* glib/tmpl/limits.sgml: exchange non-existing G_MAX_DOUBLE for
|
||||||
|
@ -290,58 +290,16 @@ gchar c
|
|||||||
|
|
||||||
# g_atomic
|
# 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>
|
<FUNCTION>
|
||||||
<NAME>g_atomic_int_inc</NAME>
|
<NAME>g_atomic_int_inc</NAME>
|
||||||
<RETURNS>void</RETURNS>
|
<RETURNS>void</RETURNS>
|
||||||
gint32 *atomic
|
gint *atomic
|
||||||
</FUNCTION>
|
</FUNCTION>
|
||||||
|
|
||||||
<FUNCTION>
|
<FUNCTION>
|
||||||
<NAME>g_atomic_int_dec_and_test</NAME>
|
<NAME>g_atomic_int_dec_and_test</NAME>
|
||||||
<RETURNS>gboolean</RETURNS>
|
<RETURNS>gboolean</RETURNS>
|
||||||
gint32 *atomic
|
gint *atomic
|
||||||
</FUNCTION>
|
</FUNCTION>
|
||||||
|
|
||||||
<STRUCT>
|
<STRUCT>
|
||||||
|
@ -665,12 +665,6 @@ g_atomic_int_inc
|
|||||||
g_atomic_int_dec_and_test
|
g_atomic_int_dec_and_test
|
||||||
</SECTION>
|
</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>
|
<SECTION>
|
||||||
<TITLE>IO Channels</TITLE>
|
<TITLE>IO Channels</TITLE>
|
||||||
<FILE>iochannels</FILE>
|
<FILE>iochannels</FILE>
|
||||||
|
@ -66,7 +66,7 @@ Reads the value of the integer pointed to by @atomic. Also acts as
|
|||||||
a memory barrier.
|
a memory barrier.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@atomic: a pointer to a 32-bit integer.
|
@atomic: a pointer to an integer.
|
||||||
@Returns: the value of *@atomic.
|
@Returns: the value of *@atomic.
|
||||||
@Since: 2.4
|
@Since: 2.4
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ Atomically adds @val to the integer pointed to by @atomic.
|
|||||||
Also acts as a memory barrier.
|
Also acts as a memory barrier.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@atomic: a pointer to a 32-bit integer.
|
@atomic: a pointer to an integer.
|
||||||
@val: the value to add to *@atomic.
|
@val: the value to add to *@atomic.
|
||||||
@Since: 2.4
|
@Since: 2.4
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ the value of *@atomic just before the addition took place.
|
|||||||
Also acts as a memory barrier.
|
Also acts as a memory barrier.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@atomic: a pointer to a 32-bit integer.
|
@atomic: a pointer to an integer.
|
||||||
@val: the value to add to *@atomic.
|
@val: the value to add to *@atomic.
|
||||||
@Returns: the value of *@atomic before the addition.
|
@Returns: the value of *@atomic before the addition.
|
||||||
@Since: 2.4
|
@Since: 2.4
|
||||||
@ -102,7 +102,7 @@ if they are equal, atomically exchanges *@atomic with @newval.
|
|||||||
Also acts as a memory barrier.
|
Also acts as a memory barrier.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@atomic: a pointer to a 32-bit integer.
|
@atomic: a pointer to an integer.
|
||||||
@oldval: the assumed old value of *@atomic.
|
@oldval: the assumed old value of *@atomic.
|
||||||
@newval: the new value of *@atomic.
|
@newval: the new value of *@atomic.
|
||||||
@Returns: %TRUE, if *@atomic was equal @oldval. %FALSE otherwise.
|
@Returns: %TRUE, if *@atomic was equal @oldval. %FALSE otherwise.
|
||||||
@ -139,7 +139,7 @@ Also acts as a memory barrier.
|
|||||||
Atomically increments the integer pointed to by @atomic by 1.
|
Atomically increments the integer pointed to by @atomic by 1.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@atomic: a pointer to a 32-bit integer.
|
@atomic: a pointer to an integer.
|
||||||
@Since: 2.4
|
@Since: 2.4
|
||||||
|
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ Atomically increments the integer pointed to by @atomic by 1.
|
|||||||
Atomically decrements the integer pointed to by @atomic by 1.
|
Atomically decrements the integer pointed to by @atomic by 1.
|
||||||
</para>
|
</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
|
@Returns: %TRUE, if the integer pointed to by @atomic is 0 after
|
||||||
decrementing it.
|
decrementing it.
|
||||||
@Since: 2.4
|
@Since: 2.4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user