mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
gatomicarray: Drop volatile qualifier from GAtomicArray API
This is an API break, but it should not affect third party code since that code should not be interacting with the `data` member in a way that invokes its `volatile` qualifier (such as copying to an intermediate variable). Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #600
This commit is contained in:
parent
8a87069ff4
commit
46bae4f18d
@ -29,7 +29,7 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
typedef struct _GAtomicArray GAtomicArray;
|
typedef struct _GAtomicArray GAtomicArray;
|
||||||
struct _GAtomicArray {
|
struct _GAtomicArray {
|
||||||
volatile gpointer data; /* elements - atomic */
|
gpointer data; /* elements - atomic */
|
||||||
};
|
};
|
||||||
|
|
||||||
void _g_atomic_array_init (GAtomicArray *array);
|
void _g_atomic_array_init (GAtomicArray *array);
|
||||||
@ -42,7 +42,7 @@ void _g_atomic_array_update (GAtomicArray *array,
|
|||||||
#define G_ATOMIC_ARRAY_GET_LOCKED(_array, _type) ((_type *)((_array)->data))
|
#define G_ATOMIC_ARRAY_GET_LOCKED(_array, _type) ((_type *)((_array)->data))
|
||||||
|
|
||||||
#define G_ATOMIC_ARRAY_DO_TRANSACTION(_array, _type, _C_) G_STMT_START { \
|
#define G_ATOMIC_ARRAY_DO_TRANSACTION(_array, _type, _C_) G_STMT_START { \
|
||||||
volatile gpointer *_datap = &(_array)->data; \
|
gpointer *_datap = &(_array)->data; \
|
||||||
_type *transaction_data, *__check; \
|
_type *transaction_data, *__check; \
|
||||||
\
|
\
|
||||||
__check = g_atomic_pointer_get (_datap); \
|
__check = g_atomic_pointer_get (_datap); \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user