mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 16:32:18 +01:00 
			
		
		
		
	glib: add internal macro G_THREAD_LOCAL for support for thread local storage
_Thread_local is also C11, so possibly other compilers would also support it. However, since not *all* compilers support it, it can anyway only be used as optimization and conditional asserts. As such, the current detection based on __GNUC__ to only support gcc (and clang) is good enough.
This commit is contained in:
		| @@ -321,4 +321,10 @@ GLibPrivateVTable *glib__private__ (void); | ||||
| gboolean g_uint_equal (gconstpointer v1, gconstpointer v2); | ||||
| guint g_uint_hash (gconstpointer v); | ||||
|  | ||||
| #if defined(__GNUC__) | ||||
| #define G_THREAD_LOCAL __thread | ||||
| #else | ||||
| #undef G_THREAD_LOCAL | ||||
| #endif | ||||
|  | ||||
| #endif /* __GLIB_PRIVATE_H__ */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user