mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-01 13:23:07 +02:00
thread: Delete g_system_thread_self()
It's no longer used for anything at all.
This commit is contained in:
parent
a90a4b967f
commit
39ae59c47e
@ -1140,12 +1140,6 @@ g_system_thread_exit (void)
|
|||||||
pthread_exit (NULL);
|
pthread_exit (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
g_system_thread_self (gpointer thread)
|
|
||||||
{
|
|
||||||
*(pthread_t*)thread = pthread_self();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
g_system_thread_set_name (const gchar *name)
|
g_system_thread_set_name (const gchar *name)
|
||||||
{
|
{
|
||||||
|
@ -463,29 +463,6 @@ struct _GThreadData
|
|||||||
gboolean joinable;
|
gboolean joinable;
|
||||||
};
|
};
|
||||||
|
|
||||||
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
|
void
|
||||||
g_system_thread_exit (void)
|
g_system_thread_exit (void)
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,6 @@ G_BEGIN_DECLS
|
|||||||
typedef struct _GRealThread GRealThread;
|
typedef struct _GRealThread GRealThread;
|
||||||
typedef void (*GThreadSetup) (GRealThread *thread);
|
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_join (gpointer thread);
|
||||||
G_GNUC_INTERNAL void g_system_thread_create (GThreadFunc func,
|
G_GNUC_INTERNAL void g_system_thread_create (GThreadFunc func,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user