gatomicarray: Support for cleaning up

Cleanup atomic array manually as very last thing
Otherwise we keep putting stuff in freelist during cleanup.

Initial work by: Dan Winship <danw@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=711778
This commit is contained in:
Stef Walter
2013-11-07 22:42:39 +01:00
parent 11dc3eedb5
commit b33fabd585
2 changed files with 33 additions and 1 deletions

View File

@@ -35,11 +35,13 @@ struct _GAtomicArray {
};
void _g_atomic_array_init (GAtomicArray *array);
void _g_atomic_array_free (GAtomicArray *array);
gpointer _g_atomic_array_copy (GAtomicArray *array,
gsize header_size,
gsize additional_element_size);
void _g_atomic_array_update (GAtomicArray *array,
gpointer new_data);
void _g_atomic_array_cleanup(void);
#define G_ATOMIC_ARRAY_GET_LOCKED(_array, _type) ((_type *)((_array)->data))