mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
gthread: Fix a typo in an #ifdef on the non-native mutex path
This seems to have been present since the code was introduced in commitcedc82290f
. The attr variable is defined under one #ifdef, but destroyed under another, which doesn’t make any sense. The second #ifdef variable is actually an enum value, rather than the static initialiser value which makes more sense in the context. Note that GMutex used to be statically initialised to the value of PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP in gthread.h, before this was reworked in commite081eadda5
. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=793026
This commit is contained in:
parent
1574321e51
commit
79d9ea2598
@ -105,7 +105,7 @@ g_mutex_impl_new (void)
|
||||
if G_UNLIKELY ((status = pthread_mutex_init (mutex, pattr)) != 0)
|
||||
g_thread_abort (status, "pthread_mutex_init");
|
||||
|
||||
#ifdef PTHREAD_ADAPTIVE_MUTEX_NP
|
||||
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
|
||||
pthread_mutexattr_destroy (&attr);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user