mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-19 07:08:54 +02:00
gmain: Mark some ref_count variables as volatile
To make it more obvious they should exclusively be accessed with atomic functions. https://bugzilla.gnome.org/show_bug.cgi?id=737677
This commit is contained in:
committed by
Philip Withnall
parent
d73f8eec48
commit
9297a596d6
@@ -268,7 +268,7 @@ struct _GMainContext
|
|||||||
guint owner_count;
|
guint owner_count;
|
||||||
GSList *waiters;
|
GSList *waiters;
|
||||||
|
|
||||||
gint ref_count;
|
volatile gint ref_count;
|
||||||
|
|
||||||
GHashTable *sources; /* guint -> GSource */
|
GHashTable *sources; /* guint -> GSource */
|
||||||
|
|
||||||
@@ -310,7 +310,7 @@ struct _GMainLoop
|
|||||||
{
|
{
|
||||||
GMainContext *context;
|
GMainContext *context;
|
||||||
gboolean is_running;
|
gboolean is_running;
|
||||||
gint ref_count;
|
volatile gint ref_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GTimeoutSource
|
struct _GTimeoutSource
|
||||||
|
Reference in New Issue
Block a user