[glib] Finish killing off GSystemThread
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Finish killing off GSystemThread
- Date: Thu, 13 Oct 2011 03:25:35 +0000 (UTC)
commit a5800ef336661e51db019d7bc4b98b184b06ba86
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Oct 12 23:04:15 2011 -0400
Finish killing off GSystemThread
configure.ac | 14 --------------
glib/deprecated/gthread.h | 13 +++++++++++--
glib/glibconfig.h.win32.in | 16 ----------------
glib/gthreadprivate.h | 1 -
4 files changed, 11 insertions(+), 33 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e6feb1d..63703db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3091,20 +3091,6 @@ _______EOF
#define G_THREADS_IMPL_$g_threads_impl_def
_______EOF
- cat >>$outfile <<_______EOF
-/* This represents a system thread as used by the implementation. An
- * alien implementaion, as loaded by g_thread_init can only count on
- * "sizeof (gpointer)" bytes to store their info. We however need more
- * for some of our native implementations. */
-typedef union _GSystemThread GSystemThread;
-union _GSystemThread
-{
- char data[[$g_system_thread_sizeof]];
- double dummy_double;
- void *dummy_pointer;
- long dummy_long;
-};
-_______EOF
if test x"$g_memory_barrier_needed" != xno; then
echo >>$outfile
echo "#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1" >>$outfile
diff --git a/glib/deprecated/gthread.h b/glib/deprecated/gthread.h
index e699070..b375a49 100644
--- a/glib/deprecated/gthread.h
+++ b/glib/deprecated/gthread.h
@@ -153,10 +153,19 @@ struct _GStaticRecMutex
/*< private >*/
GStaticMutex mutex;
guint depth;
- GSystemThread owner;
+
+ /* ABI compat only */
+ union {
+#ifdef G_OS_WIN32
+ void *owner;
+#else
+ pthread_t owner;
+#endif
+ gdouble dummy;
+ };
};
-#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT, 0, {{0, 0, 0, 0}} }
+#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT }
GLIB_DEPRECATED_FOR(g_rec_mutex_init)
void g_static_rec_mutex_init (GStaticRecMutex *mutex);
diff --git a/glib/glibconfig.h.win32.in b/glib/glibconfig.h.win32.in
index e785121..ccd9be3 100644
--- a/glib/glibconfig.h.win32.in
+++ b/glib/glibconfig.h.win32.in
@@ -206,22 +206,6 @@ typedef unsigned __int64 guintptr;
#define G_THREADS_ENABLED
#define G_THREADS_IMPL_WIN32
-/* This represents a system thread as used by the implementation. An
- * alien implementaion, as loaded by g_thread_init can only count on
- * "sizeof (gpointer)" bytes to store their info. We however need more
- * for some of our native implementations. */
-typedef union _GSystemThread GSystemThread;
-union _GSystemThread
-{
-#ifndef _WIN64
- char data[4];
-#else
- char data[8];
-#endif
- double dummy_double;
- void *dummy_pointer;
- long dummy_long;
-};
#define GINT16_TO_LE(val) ((gint16) (val))
#define GUINT16_TO_LE(val) ((guint16) (val))
diff --git a/glib/gthreadprivate.h b/glib/gthreadprivate.h
index 565cd10..de847e4 100644
--- a/glib/gthreadprivate.h
+++ b/glib/gthreadprivate.h
@@ -61,7 +61,6 @@ struct _GRealThread
GThread thread;
const gchar *name;
gpointer retval;
- GSystemThread system_thread;
};
#ifdef G_OS_WIN32
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]