mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
Merge branch 'g-once-data-race' into 'master'
gthread: Remove unsynchronized access to g_once_init_list from assertion See merge request GNOME/glib!477
This commit is contained in:
commit
11847b831e
@ -691,10 +691,10 @@ void
|
||||
|
||||
g_return_if_fail (g_atomic_pointer_get (value_location) == NULL);
|
||||
g_return_if_fail (result != 0);
|
||||
g_return_if_fail (g_once_init_list != NULL);
|
||||
|
||||
g_atomic_pointer_set (value_location, result);
|
||||
g_mutex_lock (&g_once_mutex);
|
||||
g_return_if_fail (g_once_init_list != NULL);
|
||||
g_once_init_list = g_slist_remove (g_once_init_list, (void*) value_location);
|
||||
g_cond_broadcast (&g_once_cond);
|
||||
g_mutex_unlock (&g_once_mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user