mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
gobject: Drop unnecessary volatile qualifiers from internal variables
These variables were already (correctly) accessed atomically. The `volatile` qualifier doesn’t help with that. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #600
This commit is contained in:
parent
1314ff93fc
commit
08d04d0428
@ -98,7 +98,7 @@
|
||||
|
||||
typedef union {
|
||||
GClosure closure;
|
||||
volatile gint vint;
|
||||
gint vint;
|
||||
} ClosureInt;
|
||||
|
||||
#define CHANGE_FIELD(_closure, _field, _OP, _value, _must_set, _SET_OLD, _SET_NEW) \
|
||||
|
@ -175,20 +175,20 @@ struct _GClosureNotifyData
|
||||
struct _GClosure
|
||||
{
|
||||
/*< private >*/
|
||||
volatile guint ref_count : 15;
|
||||
guint ref_count : 15; /* (atomic) */
|
||||
/* meta_marshal is not used anymore but must be zero for historical reasons
|
||||
as it was exposed in the G_CLOSURE_N_NOTIFIERS macro */
|
||||
volatile guint meta_marshal_nouse : 1;
|
||||
volatile guint n_guards : 1;
|
||||
volatile guint n_fnotifiers : 2; /* finalization notifiers */
|
||||
volatile guint n_inotifiers : 8; /* invalidation notifiers */
|
||||
volatile guint in_inotify : 1;
|
||||
volatile guint floating : 1;
|
||||
guint meta_marshal_nouse : 1; /* (atomic) */
|
||||
guint n_guards : 1; /* (atomic) */
|
||||
guint n_fnotifiers : 2; /* finalization notifiers (atomic) */
|
||||
guint n_inotifiers : 8; /* invalidation notifiers (atomic) */
|
||||
guint in_inotify : 1; /* (atomic) */
|
||||
guint floating : 1; /* (atomic) */
|
||||
/*< protected >*/
|
||||
volatile guint derivative_flag : 1;
|
||||
guint derivative_flag : 1; /* (atomic) */
|
||||
/*< public >*/
|
||||
volatile guint in_marshal : 1;
|
||||
volatile guint is_invalid : 1;
|
||||
guint in_marshal : 1; /* (atomic) */
|
||||
guint is_invalid : 1; /* (atomic) */
|
||||
|
||||
/*< private >*/ void (*marshal) (GClosure *closure,
|
||||
GValue /*out*/ *return_value,
|
||||
|
@ -174,9 +174,9 @@ typedef struct
|
||||
GTypeInstance g_type_instance;
|
||||
|
||||
/*< private >*/
|
||||
volatile guint ref_count;
|
||||
guint ref_count; /* (atomic) */
|
||||
#ifdef HAVE_OPTIONAL_FLAGS
|
||||
volatile guint optional_flags;
|
||||
guint optional_flags; /* (atomic) */
|
||||
#endif
|
||||
GData *qdata;
|
||||
} GObjectReal;
|
||||
|
@ -221,9 +221,9 @@ typedef enum
|
||||
/* --- structures --- */
|
||||
struct _TypeNode
|
||||
{
|
||||
guint volatile ref_count;
|
||||
guint ref_count; /* (atomic) */
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
guint volatile instance_count;
|
||||
guint instance_count; /* (atomic) */
|
||||
#endif
|
||||
GTypePlugin *plugin;
|
||||
guint n_children; /* writable with lock */
|
||||
@ -233,7 +233,7 @@ struct _TypeNode
|
||||
guint is_instantiatable : 1;
|
||||
guint mutatable_check_cache : 1; /* combines some common path checks */
|
||||
GType *children; /* writable with lock */
|
||||
TypeData * volatile data;
|
||||
TypeData *data;
|
||||
GQuark qname;
|
||||
GData *global_gdata;
|
||||
union {
|
||||
@ -569,8 +569,8 @@ type_node_new_W (TypeNode *pnode,
|
||||
}
|
||||
|
||||
static inline IFaceEntry*
|
||||
lookup_iface_entry_I (volatile IFaceEntries *entries,
|
||||
TypeNode *iface_node)
|
||||
lookup_iface_entry_I (IFaceEntries *entries,
|
||||
TypeNode *iface_node)
|
||||
{
|
||||
guint8 *offsets;
|
||||
guint offset_index;
|
||||
|
Loading…
Reference in New Issue
Block a user