From: Ryan Lortie Date: Mon, 19 Sep 2011 04:27:56 +0000 (-0400) Subject: Remove the concept of 'bound' X-Git-Tag: 2.31.0~420 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b4c303d61d614af90a92de4c85532fcc245118e;p=platform%2Fupstream%2Fglib.git Remove the concept of 'bound' This was ignored on Windows. On POSIX, where supported, it controlled if we ended up with a proper system thread or a user-mode thread. Linux did not support this. --- diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c index 01bd092..e8a4b84 100644 --- a/glib/gthread-posix.c +++ b/glib/gthread-posix.c @@ -519,13 +519,6 @@ g_system_thread_create (GThreadFunc thread_func, } #endif /* HAVE_PTHREAD_ATTR_SETSTACKSIZE */ -#ifdef PTHREAD_SCOPE_SYSTEM - if (bound) - /* No error check here, because some systems can't do it and we - * simply don't want threads to fail because of that. */ - pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM); -#endif /* PTHREAD_SCOPE_SYSTEM */ - posix_check_cmd (pthread_attr_setdetachstate (&attr, joinable ? PTHREAD_CREATE_JOINABLE : PTHREAD_CREATE_DETACHED)); diff --git a/glib/gthread.c b/glib/gthread.c index e46497a..6b79cd2 100644 --- a/glib/gthread.c +++ b/glib/gthread.c @@ -1683,7 +1683,7 @@ g_thread_create_proxy (gpointer data) * @data: an argument to supply to the new thread. * @stack_size: a stack size for the new thread. * @joinable: should this thread be joinable? - * @bound: should this thread be bound to a system thread? + * @bound: ignored * @priority: ignored * @error: return location for error. * @Returns: the new #GThread on success. @@ -1695,11 +1695,7 @@ g_thread_create_proxy (gpointer data) * * If @joinable is %TRUE, you can wait for this threads termination * calling g_thread_join(). Otherwise the thread will just disappear - * when it terminates. If @bound is %TRUE, this thread will be - * scheduled in the system scope, otherwise the implementation is free - * to do scheduling in the process scope. The first variant is more - * expensive resource-wise, but generally faster. On some systems (e.g. - * Linux) all threads are bound. + * when it terminates. * * The new thread executes the function @func with the argument @data. * If the thread was created successfully, it is returned. @@ -1733,7 +1729,7 @@ g_thread_create_full (GThreadFunc func, result->private_data = NULL; G_LOCK (g_thread); g_system_thread_create (g_thread_create_proxy, result, - stack_size, joinable, bound, 0, + stack_size, joinable, 0, 0, &result->system_thread, &local_error); if (!local_error) {