[glib] g_system_thread_create: drop 'data' arg
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] g_system_thread_create: drop 'data' arg
- Date: Thu, 13 Oct 2011 02:43:46 +0000 (UTC)
commit a3f82c847f8f9dc7931bc9c81f95205e2178ab49
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Oct 12 22:23:12 2011 -0400
g_system_thread_create: drop 'data' arg
Since it's now always the same as the 'thread' arg.
glib/gthread-posix.c | 3 +--
glib/gthread-win32.c | 3 +--
glib/gthread.c | 2 +-
glib/gthreadprivate.h | 1 -
4 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
index 8345b4c..4f29c7b 100644
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -1083,7 +1083,6 @@ g_system_thread_free (GRealThread *thread)
void
g_system_thread_create (GThreadFunc thread_func,
- gpointer arg,
gulong stack_size,
gboolean joinable,
GRealThread *thread,
@@ -1111,7 +1110,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 ((pthread_t *) &(thread->system_thread), &attr, (void* (*)(void*))thread_func, arg);
+ ret = pthread_create ((pthread_t *) &(thread->system_thread), &attr, (void* (*)(void*))thread_func, thread);
posix_check_cmd (pthread_attr_destroy (&attr));
diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
index 5b49b61..72be9a4 100644
--- a/glib/gthread-win32.c
+++ b/glib/gthread-win32.c
@@ -499,7 +499,6 @@ g_thread_proxy (gpointer data)
void
g_system_thread_create (GThreadFunc func,
- gpointer data,
gulong stack_size,
gboolean joinable,
GRealThread *thread,
@@ -512,7 +511,7 @@ g_system_thread_create (GThreadFunc func,
retval = g_new(GThreadData, 1);
retval->func = func;
- retval->data = data;
+ retval->data = thread;
retval->joinable = joinable;
diff --git a/glib/gthread.c b/glib/gthread.c
index 7e0bb9b..e6c0c70 100644
--- a/glib/gthread.c
+++ b/glib/gthread.c
@@ -811,7 +811,7 @@ g_thread_new_internal (const gchar *name,
result->thread.data = data;
result->name = name;
G_LOCK (g_thread_new);
- g_system_thread_create (proxy, result, stack_size, joinable,
+ g_system_thread_create (proxy, stack_size, joinable,
result, &local_error);
G_UNLOCK (g_thread_new);
diff --git a/glib/gthreadprivate.h b/glib/gthreadprivate.h
index 977c29b..58f065a 100644
--- a/glib/gthreadprivate.h
+++ b/glib/gthreadprivate.h
@@ -37,7 +37,6 @@ void g_system_thread_wait (GRealThread *thread);
G_GNUC_INTERNAL
GRealThread * g_system_thread_new (void);
G_GNUC_INTERNAL void g_system_thread_create (GThreadFunc func,
- gpointer data,
gulong stack_size,
gboolean joinable,
GRealThread *thread,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]