diff options
author | Ryan Lortie <desrt@desrt.ca> | 2010-05-16 14:17:34 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2010-05-17 07:16:37 -0400 |
commit | 61219e264083184eada5c5ef2795b7c531470704 (patch) | |
tree | 7ffb2e0d66abc0ac33f55058d400c326eeaf6fc0 /gio/gsettingsbackendinternal.h | |
parent | 4967b6d2ab5a0a83609a825ea113bc75f61bfdb1 (diff) |
GSettingsBackend: make signal dispatch threadsafe
This commit fixes up a few race conditions in the GSettingsBackend, mostly with
respect to change notifications occuring at the same time as the last reference
count on a GSettings is dropped. With GDBus feeding us our incoming signals in
a separate thread, this is something that could easily happen.
Diffstat (limited to 'gio/gsettingsbackendinternal.h')
-rw-r--r-- | gio/gsettingsbackendinternal.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gio/gsettingsbackendinternal.h b/gio/gsettingsbackendinternal.h index 62867fb22..b6679830c 100644 --- a/gio/gsettingsbackendinternal.h +++ b/gio/gsettingsbackendinternal.h @@ -27,37 +27,37 @@ #include "gsettingsbackend.h" typedef void (*GSettingsBackendChangedFunc) (GSettingsBackend *backend, + GObject *target, const gchar *key, - gpointer origin_tag, - gpointer user_data); + gpointer origin_tag); typedef void (*GSettingsBackendPathChangedFunc) (GSettingsBackend *backend, + GObject *target, const gchar *path, - gpointer origin_tag, - gpointer user_data); + gpointer origin_tag); typedef void (*GSettingsBackendKeysChangedFunc) (GSettingsBackend *backend, + GObject *target, const gchar *prefix, const gchar * const *names, - gpointer origin_tag, - gpointer user_data); + gpointer origin_tag); typedef void (*GSettingsBackendWritableChangedFunc) (GSettingsBackend *backend, - const gchar *key, - gpointer user_data); + GObject *target, + const gchar *key); typedef void (*GSettingsBackendPathWritableChangedFunc) (GSettingsBackend *backend, - const gchar *path, - gpointer user_data); + GObject *target, + const gchar *path); G_GNUC_INTERNAL void g_settings_backend_watch (GSettingsBackend *backend, + GObject *target, GMainContext *context, GSettingsBackendChangedFunc changed, GSettingsBackendPathChangedFunc path_changed, GSettingsBackendKeysChangedFunc keys_changed, GSettingsBackendWritableChangedFunc writable_changed, - GSettingsBackendPathWritableChangedFunc path_writable_changed, - gpointer user_data); + GSettingsBackendPathWritableChangedFunc path_writable_changed); G_GNUC_INTERNAL void g_settings_backend_unwatch (GSettingsBackend *backend, - gpointer user_data); + GObject *target); G_GNUC_INTERNAL gboolean g_settings_backend_supports_context (const gchar *context); |