[glib] g_system_thread_create: SystemThread -> RealThread



commit 3237eaf5d527ecccae51b490d9cfbbf7e6b8538c
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Oct 12 22:19:28 2011 -0400

    g_system_thread_create: SystemThread -> RealThread
    
    Just like g_system_thread_wait().

 glib/gthread-posix.c  |    4 ++--
 glib/gthread-win32.c  |    4 ++--
 glib/gthread.c        |    2 +-
 glib/gthreadprivate.h |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
index f53f722..8345b4c 100644
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -1086,7 +1086,7 @@ g_system_thread_create (GThreadFunc       thread_func,
                         gpointer          arg,
                         gulong            stack_size,
                         gboolean          joinable,
-                        gpointer          thread,
+                        GRealThread      *thread,
                         GError          **error)
 {
   pthread_attr_t attr;
@@ -1111,7 +1111,7 @@ g_system_thread_create (GThreadFunc       thread_func,
   posix_check_cmd (pthread_attr_setdetachstate (&attr,
           joinable ? PTHREAD_CREATE_JOINABLE : PTHREAD_CREATE_DETACHED));
 
-  ret = pthread_create (thread, &attr, (void* (*)(void*))thread_func, arg);
+  ret = pthread_create ((pthread_t *) &(thread->system_thread), &attr, (void* (*)(void*))thread_func, arg);
 
   posix_check_cmd (pthread_attr_destroy (&attr));
 
diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
index 9988aec..5b49b61 100644
--- a/glib/gthread-win32.c
+++ b/glib/gthread-win32.c
@@ -502,7 +502,7 @@ g_system_thread_create (GThreadFunc       func,
                         gpointer          data,
                         gulong            stack_size,
                         gboolean          joinable,
-                        gpointer          thread,
+                        GRealThread      *thread,
                         GError          **error)
 {
   guint ignore;
@@ -529,7 +529,7 @@ g_system_thread_create (GThreadFunc       func,
       return;
     }
 
-  *(GThreadData **)thread = retval;
+  *(GThreadData **) &(thread->system_thread) = retval;
 }
 
 void
diff --git a/glib/gthread.c b/glib/gthread.c
index f13eb3a..7e0bb9b 100644
--- a/glib/gthread.c
+++ b/glib/gthread.c
@@ -812,7 +812,7 @@ g_thread_new_internal (const gchar   *name,
   result->name = name;
   G_LOCK (g_thread_new);
   g_system_thread_create (proxy, result, stack_size, joinable,
-                          &result->system_thread, &local_error);
+                          result, &local_error);
   G_UNLOCK (g_thread_new);
 
   if (local_error)
diff --git a/glib/gthreadprivate.h b/glib/gthreadprivate.h
index 72aa63c..977c29b 100644
--- a/glib/gthreadprivate.h
+++ b/glib/gthreadprivate.h
@@ -40,7 +40,7 @@ G_GNUC_INTERNAL void     g_system_thread_create (GThreadFunc       func,
                                                  gpointer          data,
                                                  gulong            stack_size,
                                                  gboolean          joinable,
-                                                 gpointer          thread,
+                                                 GRealThread      *thread,
                                                  GError          **error);
 G_GNUC_INTERNAL
 void            g_system_thread_free            (GRealThread  *thread);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]