mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 03:32:12 +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
|
static void
|
||||||
register_lazy_static_resources_unlocked (void)
|
register_lazy_static_resources_unlocked (void)
|
||||||
{
|
{
|
||||||
GStaticResource *list;
|
GStaticResource *list = g_atomic_pointer_get (&lazy_register_resources);
|
||||||
|
|
||||||
do
|
while (!g_atomic_pointer_compare_and_exchange_full (&lazy_register_resources, list, NULL, &list))
|
||||||
list = g_atomic_pointer_get (&lazy_register_resources);
|
;
|
||||||
while (!g_atomic_pointer_compare_and_exchange (&lazy_register_resources, list, NULL));
|
|
||||||
|
|
||||||
while (list != NULL)
|
while (list != NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user