Remove the concept of 'bound'
authorRyan Lortie <desrt@desrt.ca>
Mon, 19 Sep 2011 04:27:56 +0000 (00:27 -0400)
committerRyan Lortie <desrt@desrt.ca>
Wed, 21 Sep 2011 20:06:55 +0000 (16:06 -0400)
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.

glib/gthread-posix.c
glib/gthread.c

index 01bd092..e8a4b84 100644 (file)
@@ -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));
 
index e46497a..6b79cd2 100644 (file)
@@ -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)
     {