mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gresource: Use compare and exchange full to get registered resources
This commit is contained in:
parent
28f83c9cf7
commit
ea904fba1a
@ -1364,11 +1364,10 @@ g_resources_get_info (const gchar *path,
|
||||
static void
|
||||
register_lazy_static_resources_unlocked (void)
|
||||
{
|
||||
GStaticResource *list;
|
||||
GStaticResource *list = g_atomic_pointer_get (&lazy_register_resources);
|
||||
|
||||
do
|
||||
list = g_atomic_pointer_get (&lazy_register_resources);
|
||||
while (!g_atomic_pointer_compare_and_exchange (&lazy_register_resources, list, NULL));
|
||||
while (!g_atomic_pointer_compare_and_exchange_full (&lazy_register_resources, list, NULL, &list))
|
||||
;
|
||||
|
||||
while (list != NULL)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user