glib r7752 - in trunk: . glib



Author: mkestner
Date: Thu Dec 18 19:20:42 2008
New Revision: 7752
URL: http://svn.gnome.org/viewvc/glib?rev=7752&view=rev

Log:

2008-12-18  Mike Kestner <mkestner novell com>

	Bug 560676 - function access for g_threads_supported

	* glib/gthreads.c (g_thread_get_initialized): new accessor for
	g_threads_supported macro.
	* glib/gthreads.h: add g_thread_get_initialized


Modified:
   trunk/ChangeLog
   trunk/glib/gthread.c
   trunk/glib/gthread.h

Modified: trunk/glib/gthread.c
==============================================================================
--- trunk/glib/gthread.c	(original)
+++ trunk/glib/gthread.c	Thu Dec 18 19:20:42 2008
@@ -974,5 +974,18 @@
     }
 }
 
+/**
+ * g_thread_get_initialized
+ *
+ * Indicates if g_thread_init() has been called.
+ *
+ * Since: 2.20
+ */
+gboolean
+g_thread_get_initialized ()
+{
+  return g_thread_supported ();
+}
+
 #define __G_THREAD_C__
 #include "galiasdef.c"

Modified: trunk/glib/gthread.h
==============================================================================
--- trunk/glib/gthread.h	(original)
+++ trunk/glib/gthread.h	Thu Dec 18 19:20:42 2008
@@ -134,6 +134,11 @@
  */
 void    g_thread_init_with_errorcheck_mutexes (GThreadFunctions* vtable);
 
+/* Checks if thread support is initialized.  Identical to the
+ * g_thread_supported macro but provided for language bindings.
+ */
+gboolean g_thread_get_initialized (void);
+
 /* A random number to recognize debug calls to g_mutex_... */
 #define G_MUTEX_DEBUG_MAGIC 0xf8e18ad7
 



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