[glib] thread: Delete g_system_thread_self()



commit 39ae59c47e2fbed30da725041b4cad552bea82c7
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Oct 12 18:35:45 2011 -0400

    thread: Delete g_system_thread_self()
    
    It's no longer used for anything at all.

 glib/gthread-posix.c  |    6 ------
 glib/gthread-win32.c  |   23 -----------------------
 glib/gthreadprivate.h |    1 -
 3 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
index 6954f3f..4e103e8 100644
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -1141,12 +1141,6 @@ g_system_thread_exit (void)
 }
 
 void
-g_system_thread_self (gpointer thread)
-{
-  *(pthread_t*)thread = pthread_self();
-}
-
-void
 g_system_thread_set_name (const gchar *name)
 {
 #ifdef HAVE_SYS_PRCTL_H
diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
index c2d0b7e..fb6ad7c 100644
--- a/glib/gthread-win32.c
+++ b/glib/gthread-win32.c
@@ -464,29 +464,6 @@ struct _GThreadData
 };
 
 void
-g_system_thread_self (gpointer thread)
-{
-  GThreadData *self = TlsGetValue (g_thread_self_tls);
-
-  if (!self)
-    {
-      /* This should only happen for the main thread! */
-      HANDLE handle = GetCurrentThread ();
-      HANDLE process = GetCurrentProcess ();
-      self = g_new (GThreadData, 1);
-      win32_check_for_error (DuplicateHandle (process, handle, process,
-					      &self->thread, 0, FALSE,
-					      DUPLICATE_SAME_ACCESS));
-      win32_check_for_error (TlsSetValue (g_thread_self_tls, self));
-      self->func = NULL;
-      self->data = NULL;
-      self->joinable = FALSE;
-    }
-
-  *(GThreadData **)thread = self;
-}
-
-void
 g_system_thread_exit (void)
 {
   _endthreadex (0);
diff --git a/glib/gthreadprivate.h b/glib/gthreadprivate.h
index a9cb88a..3f9fa9b 100644
--- a/glib/gthreadprivate.h
+++ b/glib/gthreadprivate.h
@@ -32,7 +32,6 @@ G_BEGIN_DECLS
 typedef struct _GRealThread GRealThread;
 typedef void (*GThreadSetup) (GRealThread *thread);
 
-G_GNUC_INTERNAL void     g_system_thread_self  (gpointer thread);
 G_GNUC_INTERNAL void     g_system_thread_join  (gpointer thread);
 G_GNUC_INTERNAL void     g_system_thread_create (GThreadFunc       func,
                                                  gpointer          data,



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