From 4bb968e3358db98a4ad41ce7e72cf62f4458053d Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Wed, 12 Oct 2011 22:14:38 -0400 Subject: [PATCH] g_system_thread_join: take GRealThread * Make g_system_thread_join take the GRealThread* instead of a GSystemThread. --- glib/gthread-posix.c | 4 ++-- glib/gthread-win32.c | 4 ++-- glib/gthread.c | 2 +- glib/gthreadprivate.h | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c index ebeb966d7..7e86e3890 100644 --- a/glib/gthread-posix.c +++ b/glib/gthread-posix.c @@ -1140,10 +1140,10 @@ g_thread_yield (void) } void -g_system_thread_join (gpointer thread) +g_system_thread_join (GRealThread *thread) { gpointer ignore; - posix_check_cmd (pthread_join (*(pthread_t*)thread, &ignore)); + posix_check_cmd (pthread_join (*(pthread_t*)&(thread->system_thread), &ignore)); } void diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c index 8d19739fb..02d37ad7e 100644 --- a/glib/gthread-win32.c +++ b/glib/gthread-win32.c @@ -539,9 +539,9 @@ g_thread_yield (void) } void -g_system_thread_join (gpointer thread) +g_system_thread_join (GRealThread *thread) { - GThreadData *target = *(GThreadData **)thread; + GThreadData *target = *(GThreadData **)&(thread->system_thread); g_return_if_fail (target->joinable); diff --git a/glib/gthread.c b/glib/gthread.c index a9fe4b647..30784c388 100644 --- a/glib/gthread.c +++ b/glib/gthread.c @@ -883,7 +883,7 @@ g_thread_join (GThread *thread) g_return_val_if_fail (thread, NULL); g_return_val_if_fail (thread->joinable, NULL); - g_system_thread_join (&real->system_thread); + g_system_thread_join (real); retval = real->retval; diff --git a/glib/gthreadprivate.h b/glib/gthreadprivate.h index 6109060da..1c0756b8d 100644 --- a/glib/gthreadprivate.h +++ b/glib/gthreadprivate.h @@ -31,7 +31,8 @@ G_BEGIN_DECLS typedef struct _GRealThread GRealThread; -G_GNUC_INTERNAL void g_system_thread_join (gpointer thread); +G_GNUC_INTERNAL +void g_system_thread_join (GRealThread *thread); G_GNUC_INTERNAL GRealThread * g_system_thread_new (void); -- 2.11.4.GIT