mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +01:00 
			
		
		
		
	GThread: make refcounting public
This commit is contained in:
		@@ -1100,9 +1100,11 @@ g_thread_init_glib
 | 
			
		||||
g_thread_join
 | 
			
		||||
g_thread_new
 | 
			
		||||
g_thread_new_full
 | 
			
		||||
g_thread_ref
 | 
			
		||||
g_thread_self
 | 
			
		||||
g_thread_set_priority
 | 
			
		||||
g_thread_use_default_impl
 | 
			
		||||
g_thread_unref
 | 
			
		||||
g_thread_yield
 | 
			
		||||
g_static_mutex_free
 | 
			
		||||
g_static_mutex_get_mutex_impl
 | 
			
		||||
 
 | 
			
		||||
@@ -666,7 +666,17 @@ void
 | 
			
		||||
 | 
			
		||||
/* GThread {{{1 -------------------------------------------------------- */
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
GThread *
 | 
			
		||||
g_thread_ref (GThread *thread)
 | 
			
		||||
{
 | 
			
		||||
  GRealThread *real = (GRealThread *) thread;
 | 
			
		||||
 | 
			
		||||
  g_atomic_int_inc (&real->ref_count);
 | 
			
		||||
 | 
			
		||||
  return thread;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
g_thread_unref (GThread *thread)
 | 
			
		||||
{
 | 
			
		||||
  GRealThread *real = (GRealThread *) thread;
 | 
			
		||||
 
 | 
			
		||||
@@ -137,6 +137,8 @@ struct _GOnce
 | 
			
		||||
#  define G_TRYLOCK(name) g_mutex_trylock (&G_LOCK_NAME (name))
 | 
			
		||||
#endif /* !G_DEBUG_LOCKS */
 | 
			
		||||
 | 
			
		||||
GThread *       g_thread_ref                    (GThread        *thread);
 | 
			
		||||
void            g_thread_unref                  (GThread        *thread);
 | 
			
		||||
GThread *       g_thread_new                    (const gchar    *name,
 | 
			
		||||
                                                 GThreadFunc     func,
 | 
			
		||||
                                                 gpointer        data,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user