diff options
Diffstat (limited to 'meta-gnome/recipes-gnome/gvfs/files/0002-Adapt-to-GLib-2.31-deprecations-and-thread-API-chang.patch')
-rw-r--r-- | meta-gnome/recipes-gnome/gvfs/files/0002-Adapt-to-GLib-2.31-deprecations-and-thread-API-chang.patch | 599 |
1 files changed, 599 insertions, 0 deletions
diff --git a/meta-gnome/recipes-gnome/gvfs/files/0002-Adapt-to-GLib-2.31-deprecations-and-thread-API-chang.patch b/meta-gnome/recipes-gnome/gvfs/files/0002-Adapt-to-GLib-2.31-deprecations-and-thread-API-chang.patch new file mode 100644 index 000000000..0aa927115 --- /dev/null +++ b/meta-gnome/recipes-gnome/gvfs/files/0002-Adapt-to-GLib-2.31-deprecations-and-thread-API-chang.patch | |||
@@ -0,0 +1,599 @@ | |||
1 | From bd014bd8a442cae12aace7deb6e6a4d21ac3dd0e Mon Sep 17 00:00:00 2001 | ||
2 | From: Matthias Clasen <mclasen@redhat.com> | ||
3 | Date: Fri, 21 Oct 2011 14:15:09 +0200 | ||
4 | Subject: [PATCH] Adapt to GLib 2.31 deprecations and thread API changes | ||
5 | |||
6 | GStaticMutex and GStaticRWLock have been replaced by GMutex | ||
7 | and GRWLock, and g_thread_init() is no longer needed. | ||
8 | |||
9 | https://bugzilla.gnome.org/show_bug.cgi?id=661148 | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | |||
13 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> | ||
14 | --- | ||
15 | client/gdaemonvfs.c | 5 +- | ||
16 | client/gvfsdaemondbus.c | 15 ++++--- | ||
17 | client/gvfsfusedaemon.c | 1 - | ||
18 | common/gmounttracker.c | 43 ++++++------------ | ||
19 | configure.ac | 2 +- | ||
20 | daemon/daemon-main.c | 1 - | ||
21 | daemon/gvfsdaemonutils.c | 8 ++-- | ||
22 | daemon/main.c | 2 - | ||
23 | metadata/metatree.c | 60 +++++++++++++------------- | ||
24 | monitor/proxy/gvfsproxyvolumemonitordaemon.c | 1 - | ||
25 | 10 files changed, 60 insertions(+), 78 deletions(-) | ||
26 | |||
27 | diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c | ||
28 | index 0f021b9..ae17c3c 100644 | ||
29 | --- a/client/gdaemonvfs.c | ||
30 | +++ b/client/gdaemonvfs.c | ||
31 | @@ -298,9 +298,8 @@ g_daemon_vfs_init (GDaemonVfs *vfs) | ||
32 | |||
33 | bindtextdomain (GETTEXT_PACKAGE, GVFS_LOCALEDIR); | ||
34 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); | ||
35 | - | ||
36 | - if (g_thread_supported ()) | ||
37 | - dbus_threads_init_default (); | ||
38 | + | ||
39 | + dbus_threads_init_default (); | ||
40 | |||
41 | vfs->async_bus = dbus_bus_get_private (DBUS_BUS_SESSION, NULL); | ||
42 | |||
43 | diff --git a/client/gvfsdaemondbus.c b/client/gvfsdaemondbus.c | ||
44 | index f32a6f8..2cfd2e6 100644 | ||
45 | --- a/client/gvfsdaemondbus.c | ||
46 | +++ b/client/gvfsdaemondbus.c | ||
47 | @@ -53,7 +53,10 @@ typedef struct { | ||
48 | static gint32 vfs_data_slot = -1; | ||
49 | static GOnce once_init_dbus = G_ONCE_INIT; | ||
50 | |||
51 | -static GStaticPrivate local_connections = G_STATIC_PRIVATE_INIT; | ||
52 | +typedef struct _ThreadLocalConnections ThreadLocalConnections; | ||
53 | +static void free_local_connections (ThreadLocalConnections *local); | ||
54 | + | ||
55 | +static GPrivate local_connections = G_PRIVATE_INIT((GDestroyNotify)free_local_connections); | ||
56 | |||
57 | /* dbus id -> async connection */ | ||
58 | static GHashTable *async_map = NULL; | ||
59 | @@ -862,10 +865,10 @@ _g_vfs_daemon_call_sync (DBusMessage *message, | ||
60 | * get per-thread synchronous dbus connections * | ||
61 | *************************************************************************/ | ||
62 | |||
63 | -typedef struct { | ||
64 | +struct _ThreadLocalConnections { | ||
65 | GHashTable *connections; | ||
66 | DBusConnection *session_bus; | ||
67 | -} ThreadLocalConnections; | ||
68 | +}; | ||
69 | |||
70 | static void | ||
71 | free_mount_connection (DBusConnection *conn) | ||
72 | @@ -891,7 +894,7 @@ invalidate_local_connection (const char *dbus_id, | ||
73 | |||
74 | _g_daemon_vfs_invalidate_dbus_id (dbus_id); | ||
75 | |||
76 | - local = g_static_private_get (&local_connections); | ||
77 | + local = g_private_get (&local_connections); | ||
78 | if (local) | ||
79 | g_hash_table_remove (local->connections, dbus_id); | ||
80 | |||
81 | @@ -916,13 +919,13 @@ _g_dbus_connection_get_sync (const char *dbus_id, | ||
82 | |||
83 | g_once (&once_init_dbus, vfs_dbus_init, NULL); | ||
84 | |||
85 | - local = g_static_private_get (&local_connections); | ||
86 | + local = g_private_get (&local_connections); | ||
87 | if (local == NULL) | ||
88 | { | ||
89 | local = g_new0 (ThreadLocalConnections, 1); | ||
90 | local->connections = g_hash_table_new_full (g_str_hash, g_str_equal, | ||
91 | g_free, (GDestroyNotify)free_mount_connection); | ||
92 | - g_static_private_set (&local_connections, local, (GDestroyNotify)free_local_connections); | ||
93 | + g_private_set (&local_connections, local); | ||
94 | } | ||
95 | |||
96 | if (dbus_id == NULL) | ||
97 | diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c | ||
98 | index a4ba32c..7cfa81c 100644 | ||
99 | --- a/client/gvfsfusedaemon.c | ||
100 | +++ b/client/gvfsfusedaemon.c | ||
101 | @@ -2425,7 +2425,6 @@ gint | ||
102 | main (gint argc, gchar *argv []) | ||
103 | { | ||
104 | g_type_init (); | ||
105 | - g_thread_init (NULL); | ||
106 | |||
107 | return fuse_main (argc, argv, &vfs_oper, NULL /* user data */); | ||
108 | } | ||
109 | diff --git a/common/gmounttracker.c b/common/gmounttracker.c | ||
110 | index 519cd47..135a2b2 100644 | ||
111 | --- a/common/gmounttracker.c | ||
112 | +++ b/common/gmounttracker.c | ||
113 | @@ -49,7 +49,7 @@ struct _GMountTracker | ||
114 | { | ||
115 | GObject parent_instance; | ||
116 | |||
117 | - GMutex *lock; | ||
118 | + GMutex lock; | ||
119 | GList *mounts; | ||
120 | DBusConnection *connection; | ||
121 | }; | ||
122 | @@ -258,8 +258,7 @@ g_mount_tracker_finalize (GObject *object) | ||
123 | |||
124 | tracker = G_MOUNT_TRACKER (object); | ||
125 | |||
126 | - if (tracker->lock) | ||
127 | - g_mutex_free (tracker->lock); | ||
128 | + g_mutex_clear (&tracker->lock); | ||
129 | |||
130 | g_list_foreach (tracker->mounts, | ||
131 | (GFunc)g_mount_info_unref, NULL); | ||
132 | @@ -382,21 +381,18 @@ static void | ||
133 | g_mount_tracker_add_mount (GMountTracker *tracker, | ||
134 | GMountInfo *info) | ||
135 | { | ||
136 | - if (tracker->lock) | ||
137 | - g_mutex_lock (tracker->lock); | ||
138 | + g_mutex_lock (&tracker->lock); | ||
139 | |||
140 | /* Don't add multiple times */ | ||
141 | if (g_mount_tracker_find (tracker, info)) | ||
142 | { | ||
143 | - if (tracker->lock) | ||
144 | - g_mutex_unlock (tracker->lock); | ||
145 | + g_mutex_unlock (&tracker->lock); | ||
146 | return; | ||
147 | } | ||
148 | |||
149 | tracker->mounts = g_list_prepend (tracker->mounts, g_mount_info_ref (info)); | ||
150 | |||
151 | - if (tracker->lock) | ||
152 | - g_mutex_unlock (tracker->lock); | ||
153 | + g_mutex_unlock (&tracker->lock); | ||
154 | |||
155 | g_signal_emit (tracker, signals[MOUNTED], 0, info); | ||
156 | } | ||
157 | @@ -408,16 +404,14 @@ g_mount_tracker_remove_mount (GMountTracker *tracker, | ||
158 | GList *l; | ||
159 | GMountInfo *old_info; | ||
160 | |||
161 | - if (tracker->lock) | ||
162 | - g_mutex_lock (tracker->lock); | ||
163 | + g_mutex_lock (&tracker->lock); | ||
164 | |||
165 | l = g_mount_tracker_find (tracker, info); | ||
166 | |||
167 | /* Don't remove multiple times */ | ||
168 | if (l == NULL) | ||
169 | { | ||
170 | - if (tracker->lock) | ||
171 | - g_mutex_unlock (tracker->lock); | ||
172 | + g_mutex_unlock (&tracker->lock); | ||
173 | return; | ||
174 | } | ||
175 | |||
176 | @@ -425,8 +419,7 @@ g_mount_tracker_remove_mount (GMountTracker *tracker, | ||
177 | |||
178 | tracker->mounts = g_list_delete_link (tracker->mounts, l); | ||
179 | |||
180 | - if (tracker->lock) | ||
181 | - g_mutex_unlock (tracker->lock); | ||
182 | + g_mutex_unlock (&tracker->lock); | ||
183 | |||
184 | g_signal_emit (tracker, signals[UNMOUNTED], 0, old_info); | ||
185 | g_mount_info_unref (old_info); | ||
186 | @@ -548,8 +541,6 @@ init_connection (GMountTracker *tracker) | ||
187 | static void | ||
188 | g_mount_tracker_init (GMountTracker *tracker) | ||
189 | { | ||
190 | - if (g_thread_supported ()) | ||
191 | - tracker->lock = g_mutex_new (); | ||
192 | } | ||
193 | |||
194 | |||
195 | @@ -588,8 +579,7 @@ g_mount_tracker_list_mounts (GMountTracker *tracker) | ||
196 | GList *res, *l; | ||
197 | GMountInfo *copy; | ||
198 | |||
199 | - if (tracker->lock) | ||
200 | - g_mutex_lock (tracker->lock); | ||
201 | + g_mutex_lock (&tracker->lock); | ||
202 | |||
203 | res = NULL; | ||
204 | for (l = tracker->mounts; l != NULL; l = l->next) | ||
205 | @@ -598,8 +588,7 @@ g_mount_tracker_list_mounts (GMountTracker *tracker) | ||
206 | res = g_list_prepend (res, copy); | ||
207 | } | ||
208 | |||
209 | - if (tracker->lock) | ||
210 | - g_mutex_unlock (tracker->lock); | ||
211 | + g_mutex_unlock (&tracker->lock); | ||
212 | |||
213 | return g_list_reverse (res); | ||
214 | } | ||
215 | @@ -611,8 +600,7 @@ g_mount_tracker_find_by_mount_spec (GMountTracker *tracker, | ||
216 | GList *l; | ||
217 | GMountInfo *info, *found; | ||
218 | |||
219 | - if (tracker->lock) | ||
220 | - g_mutex_lock (tracker->lock); | ||
221 | + g_mutex_lock (&tracker->lock); | ||
222 | |||
223 | found = NULL; | ||
224 | for (l = tracker->mounts; l != NULL; l = l->next) | ||
225 | @@ -626,8 +614,7 @@ g_mount_tracker_find_by_mount_spec (GMountTracker *tracker, | ||
226 | } | ||
227 | } | ||
228 | |||
229 | - if (tracker->lock) | ||
230 | - g_mutex_unlock (tracker->lock); | ||
231 | + g_mutex_unlock (&tracker->lock); | ||
232 | |||
233 | return found; | ||
234 | } | ||
235 | @@ -641,8 +628,7 @@ g_mount_tracker_has_mount_spec (GMountTracker *tracker, | ||
236 | GMountInfo *info; | ||
237 | gboolean found; | ||
238 | |||
239 | - if (tracker->lock) | ||
240 | - g_mutex_lock (tracker->lock); | ||
241 | + g_mutex_lock (&tracker->lock); | ||
242 | |||
243 | found = FALSE; | ||
244 | for (l = tracker->mounts; l != NULL; l = l->next) | ||
245 | @@ -656,8 +642,7 @@ g_mount_tracker_has_mount_spec (GMountTracker *tracker, | ||
246 | } | ||
247 | } | ||
248 | |||
249 | - if (tracker->lock) | ||
250 | - g_mutex_unlock (tracker->lock); | ||
251 | + g_mutex_unlock (&tracker->lock); | ||
252 | |||
253 | return found; | ||
254 | } | ||
255 | diff --git a/configure.ac b/configure.ac | ||
256 | index ee2f90f..be0c6a1 100644 | ||
257 | --- a/configure.ac | ||
258 | +++ b/configure.ac | ||
259 | @@ -46,7 +46,7 @@ GTK_DOC_CHECK | ||
260 | DISTCHECK_CONFIGURE_FLAGS="--enable-gtk-doc" | ||
261 | AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) | ||
262 | |||
263 | -PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.29.14 gthread-2.0 gobject-2.0 gmodule-no-export-2.0 gio-unix-2.0 gio-2.0 ) | ||
264 | +PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.31.0 gobject-2.0 gmodule-no-export-2.0 gio-unix-2.0 gio-2.0 ) | ||
265 | |||
266 | PKG_CHECK_MODULES(DBUS, dbus-1) | ||
267 | |||
268 | diff --git a/daemon/daemon-main.c b/daemon/daemon-main.c | ||
269 | index ef9025c..ff2bfde 100644 | ||
270 | --- a/daemon/daemon-main.c | ||
271 | +++ b/daemon/daemon-main.c | ||
272 | @@ -63,7 +63,6 @@ daemon_init (void) | ||
273 | textdomain (GETTEXT_PACKAGE); | ||
274 | |||
275 | dbus_threads_init_default (); | ||
276 | - g_thread_init (NULL); | ||
277 | g_type_init (); | ||
278 | |||
279 | g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, log_debug, NULL); | ||
280 | diff --git a/daemon/gvfsdaemonutils.c b/daemon/gvfsdaemonutils.c | ||
281 | index f03d4b2..1efcf87 100644 | ||
282 | --- a/daemon/gvfsdaemonutils.c | ||
283 | +++ b/daemon/gvfsdaemonutils.c | ||
284 | @@ -41,7 +41,7 @@ | ||
285 | #include "gvfsdaemonprotocol.h" | ||
286 | |||
287 | static gint32 extra_fd_slot = -1; | ||
288 | -static GStaticMutex extra_lock = G_STATIC_MUTEX_INIT; | ||
289 | +static GMutex extra_lock; | ||
290 | |||
291 | typedef struct { | ||
292 | int extra_fd; | ||
293 | @@ -93,7 +93,7 @@ dbus_connection_send_fd (DBusConnection *connection, | ||
294 | return FALSE; | ||
295 | } | ||
296 | |||
297 | - g_static_mutex_lock (&extra_lock); | ||
298 | + g_mutex_lock (&extra_lock); | ||
299 | |||
300 | if (_g_socket_send_fd (extra->extra_fd, fd) == -1) | ||
301 | { | ||
302 | @@ -103,13 +103,13 @@ dbus_connection_send_fd (DBusConnection *connection, | ||
303 | g_io_error_from_errno (errsv), | ||
304 | _("Error sending file descriptor: %s"), | ||
305 | g_strerror (errsv)); | ||
306 | - g_static_mutex_unlock (&extra_lock); | ||
307 | + g_mutex_unlock (&extra_lock); | ||
308 | return FALSE; | ||
309 | } | ||
310 | |||
311 | *fd_id = extra->fd_count++; | ||
312 | |||
313 | - g_static_mutex_unlock (&extra_lock); | ||
314 | + g_mutex_unlock (&extra_lock); | ||
315 | |||
316 | return TRUE; | ||
317 | } | ||
318 | diff --git a/daemon/main.c b/daemon/main.c | ||
319 | index 4703562..2b2d549 100644 | ||
320 | --- a/daemon/main.c | ||
321 | +++ b/daemon/main.c | ||
322 | @@ -52,8 +52,6 @@ main (int argc, char *argv[]) | ||
323 | bindtextdomain (GETTEXT_PACKAGE, GVFS_LOCALEDIR); | ||
324 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); | ||
325 | textdomain (GETTEXT_PACKAGE); | ||
326 | - | ||
327 | - g_thread_init (NULL); | ||
328 | |||
329 | #ifdef SIGPIPE | ||
330 | signal (SIGPIPE, SIG_IGN); | ||
331 | diff --git a/metadata/metatree.c b/metadata/metatree.c | ||
332 | index 3420ad0..850866e 100644 | ||
333 | --- a/metadata/metatree.c | ||
334 | +++ b/metadata/metatree.c | ||
335 | @@ -68,7 +68,7 @@ | ||
336 | |||
337 | #define KEY_IS_LIST_MASK (1<<31) | ||
338 | |||
339 | -static GStaticRWLock metatree_lock = G_STATIC_RW_LOCK_INIT; | ||
340 | +static GRWLock metatree_lock; | ||
341 | |||
342 | typedef enum { | ||
343 | JOURNAL_OP_SET_KEY, | ||
344 | @@ -591,7 +591,7 @@ meta_tree_lookup_by_name (const char *name, | ||
345 | MetaTree * | ||
346 | meta_tree_ref (MetaTree *tree) | ||
347 | { | ||
348 | - g_atomic_int_exchange_and_add ((int *)&tree->ref_count, 1); | ||
349 | + g_atomic_int_inc ((int *)&tree->ref_count); | ||
350 | return tree; | ||
351 | } | ||
352 | |||
353 | @@ -672,17 +672,17 @@ meta_tree_refresh (MetaTree *tree) | ||
354 | { | ||
355 | gboolean needs_refresh; | ||
356 | |||
357 | - g_static_rw_lock_reader_lock (&metatree_lock); | ||
358 | + g_rw_lock_reader_lock (&metatree_lock); | ||
359 | needs_refresh = | ||
360 | meta_tree_needs_rereading (tree) || | ||
361 | meta_tree_has_new_journal_entries (tree); | ||
362 | - g_static_rw_lock_reader_unlock (&metatree_lock); | ||
363 | + g_rw_lock_reader_unlock (&metatree_lock); | ||
364 | |||
365 | if (needs_refresh) | ||
366 | { | ||
367 | - g_static_rw_lock_writer_lock (&metatree_lock); | ||
368 | + g_rw_lock_writer_lock (&metatree_lock); | ||
369 | meta_tree_refresh_locked (tree); | ||
370 | - g_static_rw_lock_writer_unlock (&metatree_lock); | ||
371 | + g_rw_lock_writer_unlock (&metatree_lock); | ||
372 | } | ||
373 | } | ||
374 | |||
375 | @@ -1468,7 +1468,7 @@ meta_tree_lookup_key_type (MetaTree *tree, | ||
376 | MetaKeyType type; | ||
377 | gpointer value; | ||
378 | |||
379 | - g_static_rw_lock_reader_lock (&metatree_lock); | ||
380 | + g_rw_lock_reader_lock (&metatree_lock); | ||
381 | |||
382 | new_path = meta_journal_reverse_map_path_and_key (tree->journal, | ||
383 | path, | ||
384 | @@ -1492,7 +1492,7 @@ meta_tree_lookup_key_type (MetaTree *tree, | ||
385 | type = META_KEY_TYPE_STRING; | ||
386 | |||
387 | out: | ||
388 | - g_static_rw_lock_reader_unlock (&metatree_lock); | ||
389 | + g_rw_lock_reader_unlock (&metatree_lock); | ||
390 | return type; | ||
391 | } | ||
392 | |||
393 | @@ -1506,7 +1506,7 @@ meta_tree_get_last_changed (MetaTree *tree, | ||
394 | gpointer value; | ||
395 | guint64 res, mtime; | ||
396 | |||
397 | - g_static_rw_lock_reader_lock (&metatree_lock); | ||
398 | + g_rw_lock_reader_lock (&metatree_lock); | ||
399 | |||
400 | new_path = meta_journal_reverse_map_path_and_key (tree->journal, | ||
401 | path, | ||
402 | @@ -1526,7 +1526,7 @@ meta_tree_get_last_changed (MetaTree *tree, | ||
403 | g_free (new_path); | ||
404 | |||
405 | out: | ||
406 | - g_static_rw_lock_reader_unlock (&metatree_lock); | ||
407 | + g_rw_lock_reader_unlock (&metatree_lock); | ||
408 | |||
409 | return res; | ||
410 | } | ||
411 | @@ -1543,7 +1543,7 @@ meta_tree_lookup_string (MetaTree *tree, | ||
412 | char *new_path; | ||
413 | char *res; | ||
414 | |||
415 | - g_static_rw_lock_reader_lock (&metatree_lock); | ||
416 | + g_rw_lock_reader_lock (&metatree_lock); | ||
417 | |||
418 | new_path = meta_journal_reverse_map_path_and_key (tree->journal, | ||
419 | path, | ||
420 | @@ -1572,7 +1572,7 @@ meta_tree_lookup_string (MetaTree *tree, | ||
421 | res = g_strdup (verify_string (tree, ent->value)); | ||
422 | |||
423 | out: | ||
424 | - g_static_rw_lock_reader_unlock (&metatree_lock); | ||
425 | + g_rw_lock_reader_unlock (&metatree_lock); | ||
426 | |||
427 | return res; | ||
428 | } | ||
429 | @@ -1621,7 +1621,7 @@ meta_tree_lookup_stringv (MetaTree *tree, | ||
430 | char **res; | ||
431 | guint32 num_strings, i; | ||
432 | |||
433 | - g_static_rw_lock_reader_lock (&metatree_lock); | ||
434 | + g_rw_lock_reader_lock (&metatree_lock); | ||
435 | |||
436 | new_path = meta_journal_reverse_map_path_and_key (tree->journal, | ||
437 | path, | ||
438 | @@ -1658,7 +1658,7 @@ meta_tree_lookup_stringv (MetaTree *tree, | ||
439 | } | ||
440 | |||
441 | out: | ||
442 | - g_static_rw_lock_reader_unlock (&metatree_lock); | ||
443 | + g_rw_lock_reader_unlock (&metatree_lock); | ||
444 | |||
445 | return res; | ||
446 | } | ||
447 | @@ -1876,7 +1876,7 @@ meta_tree_enumerate_dir (MetaTree *tree, | ||
448 | MetaFileDir *dir; | ||
449 | char *res_path; | ||
450 | |||
451 | - g_static_rw_lock_reader_lock (&metatree_lock); | ||
452 | + g_rw_lock_reader_lock (&metatree_lock); | ||
453 | |||
454 | data.children = children = | ||
455 | g_hash_table_new_full (g_str_hash, | ||
456 | @@ -1922,7 +1922,7 @@ meta_tree_enumerate_dir (MetaTree *tree, | ||
457 | out: | ||
458 | g_free (res_path); | ||
459 | g_hash_table_destroy (children); | ||
460 | - g_static_rw_lock_reader_unlock (&metatree_lock); | ||
461 | + g_rw_lock_reader_unlock (&metatree_lock); | ||
462 | } | ||
463 | |||
464 | typedef struct { | ||
465 | @@ -2116,7 +2116,7 @@ meta_tree_enumerate_keys (MetaTree *tree, | ||
466 | GHashTableIter iter; | ||
467 | char *res_path; | ||
468 | |||
469 | - g_static_rw_lock_reader_lock (&metatree_lock); | ||
470 | + g_rw_lock_reader_lock (&metatree_lock); | ||
471 | |||
472 | keydata.keys = keys = | ||
473 | g_hash_table_new_full (g_str_hash, | ||
474 | @@ -2170,7 +2170,7 @@ meta_tree_enumerate_keys (MetaTree *tree, | ||
475 | out: | ||
476 | g_free (res_path); | ||
477 | g_hash_table_destroy (keys); | ||
478 | - g_static_rw_lock_reader_unlock (&metatree_lock); | ||
479 | + g_rw_lock_reader_unlock (&metatree_lock); | ||
480 | } | ||
481 | |||
482 | |||
483 | @@ -2371,9 +2371,9 @@ meta_tree_flush (MetaTree *tree) | ||
484 | { | ||
485 | gboolean res; | ||
486 | |||
487 | - g_static_rw_lock_writer_lock (&metatree_lock); | ||
488 | + g_rw_lock_writer_lock (&metatree_lock); | ||
489 | res = meta_tree_flush_locked (tree); | ||
490 | - g_static_rw_lock_writer_unlock (&metatree_lock); | ||
491 | + g_rw_lock_writer_unlock (&metatree_lock); | ||
492 | return res; | ||
493 | } | ||
494 | |||
495 | @@ -2386,7 +2386,7 @@ meta_tree_unset (MetaTree *tree, | ||
496 | guint64 mtime; | ||
497 | gboolean res; | ||
498 | |||
499 | - g_static_rw_lock_writer_lock (&metatree_lock); | ||
500 | + g_rw_lock_writer_lock (&metatree_lock); | ||
501 | |||
502 | if (tree->journal == NULL || | ||
503 | !tree->journal->journal_valid) | ||
504 | @@ -2412,7 +2412,7 @@ meta_tree_unset (MetaTree *tree, | ||
505 | g_string_free (entry, TRUE); | ||
506 | |||
507 | out: | ||
508 | - g_static_rw_lock_writer_unlock (&metatree_lock); | ||
509 | + g_rw_lock_writer_unlock (&metatree_lock); | ||
510 | return res; | ||
511 | } | ||
512 | |||
513 | @@ -2426,7 +2426,7 @@ meta_tree_set_string (MetaTree *tree, | ||
514 | guint64 mtime; | ||
515 | gboolean res; | ||
516 | |||
517 | - g_static_rw_lock_writer_lock (&metatree_lock); | ||
518 | + g_rw_lock_writer_lock (&metatree_lock); | ||
519 | |||
520 | if (tree->journal == NULL || | ||
521 | !tree->journal->journal_valid) | ||
522 | @@ -2452,7 +2452,7 @@ meta_tree_set_string (MetaTree *tree, | ||
523 | g_string_free (entry, TRUE); | ||
524 | |||
525 | out: | ||
526 | - g_static_rw_lock_writer_unlock (&metatree_lock); | ||
527 | + g_rw_lock_writer_unlock (&metatree_lock); | ||
528 | return res; | ||
529 | } | ||
530 | |||
531 | @@ -2466,7 +2466,7 @@ meta_tree_set_stringv (MetaTree *tree, | ||
532 | guint64 mtime; | ||
533 | gboolean res; | ||
534 | |||
535 | - g_static_rw_lock_writer_lock (&metatree_lock); | ||
536 | + g_rw_lock_writer_lock (&metatree_lock); | ||
537 | |||
538 | if (tree->journal == NULL || | ||
539 | !tree->journal->journal_valid) | ||
540 | @@ -2492,7 +2492,7 @@ meta_tree_set_stringv (MetaTree *tree, | ||
541 | g_string_free (entry, TRUE); | ||
542 | |||
543 | out: | ||
544 | - g_static_rw_lock_writer_unlock (&metatree_lock); | ||
545 | + g_rw_lock_writer_unlock (&metatree_lock); | ||
546 | return res; | ||
547 | } | ||
548 | |||
549 | @@ -2504,7 +2504,7 @@ meta_tree_remove (MetaTree *tree, | ||
550 | guint64 mtime; | ||
551 | gboolean res; | ||
552 | |||
553 | - g_static_rw_lock_writer_lock (&metatree_lock); | ||
554 | + g_rw_lock_writer_lock (&metatree_lock); | ||
555 | |||
556 | if (tree->journal == NULL || | ||
557 | !tree->journal->journal_valid) | ||
558 | @@ -2530,7 +2530,7 @@ meta_tree_remove (MetaTree *tree, | ||
559 | g_string_free (entry, TRUE); | ||
560 | |||
561 | out: | ||
562 | - g_static_rw_lock_writer_unlock (&metatree_lock); | ||
563 | + g_rw_lock_writer_unlock (&metatree_lock); | ||
564 | return res; | ||
565 | } | ||
566 | |||
567 | @@ -2543,7 +2543,7 @@ meta_tree_copy (MetaTree *tree, | ||
568 | guint64 mtime; | ||
569 | gboolean res; | ||
570 | |||
571 | - g_static_rw_lock_writer_lock (&metatree_lock); | ||
572 | + g_rw_lock_writer_lock (&metatree_lock); | ||
573 | |||
574 | if (tree->journal == NULL || | ||
575 | !tree->journal->journal_valid) | ||
576 | @@ -2569,7 +2569,7 @@ meta_tree_copy (MetaTree *tree, | ||
577 | g_string_free (entry, TRUE); | ||
578 | |||
579 | out: | ||
580 | - g_static_rw_lock_writer_unlock (&metatree_lock); | ||
581 | + g_rw_lock_writer_unlock (&metatree_lock); | ||
582 | return res; | ||
583 | } | ||
584 | |||
585 | diff --git a/monitor/proxy/gvfsproxyvolumemonitordaemon.c b/monitor/proxy/gvfsproxyvolumemonitordaemon.c | ||
586 | index 4be64e0..fe2f1a7 100644 | ||
587 | --- a/monitor/proxy/gvfsproxyvolumemonitordaemon.c | ||
588 | +++ b/monitor/proxy/gvfsproxyvolumemonitordaemon.c | ||
589 | @@ -2050,7 +2050,6 @@ g_vfs_proxy_volume_monitor_daemon_init (void) | ||
590 | textdomain (GETTEXT_PACKAGE); | ||
591 | |||
592 | dbus_threads_init_default (); | ||
593 | - g_thread_init (NULL); | ||
594 | g_type_init (); | ||
595 | } | ||
596 | |||
597 | -- | ||
598 | 1.7.6.5 | ||
599 | |||