[glib/wip/mutexes] Remove the concept of 'bound'



commit d52a826d4b887436d1e5ba8dc4b8af8a49beaae8
Author: Ryan Lortie <desrt desrt ca>
Date:   Mon Sep 19 00:27:56 2011 -0400

    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.

 glib/gthread-posix.c |    7 -------
 glib/gthread.c       |   10 +++-------
 2 files changed, 3 insertions(+), 14 deletions(-)
---
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 eb7b009..8ec6991 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)
     {



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