Remove unused global mutexes for win_fds, sid_atom_cache
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 16 Apr 2013 11:14:02 +0000 (12:14 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 13 May 2013 10:58:38 +0000 (11:58 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
dbus/dbus-internals.h
dbus/dbus-sysdeps.c
dbus/dbus-threads.c

index 28486a8..382630d 100644 (file)
@@ -305,25 +305,23 @@ extern int _dbus_current_generation;
 #define _DBUS_LOCK(name)                _dbus_rmutex_lock   (_dbus_lock_##name)
 #define _DBUS_UNLOCK(name)              _dbus_rmutex_unlock (_dbus_lock_##name)
 
-/* 1-5 */
+/* index 0-4 */
 _DBUS_DECLARE_GLOBAL_LOCK (list);
 _DBUS_DECLARE_GLOBAL_LOCK (connection_slots);
 _DBUS_DECLARE_GLOBAL_LOCK (pending_call_slots);
 _DBUS_DECLARE_GLOBAL_LOCK (server_slots);
 _DBUS_DECLARE_GLOBAL_LOCK (message_slots);
-/* 5-10 */
+/* index 5-9 */
 _DBUS_DECLARE_GLOBAL_LOCK (bus);
 _DBUS_DECLARE_GLOBAL_LOCK (bus_datas);
 _DBUS_DECLARE_GLOBAL_LOCK (shutdown_funcs);
 _DBUS_DECLARE_GLOBAL_LOCK (system_users);
 _DBUS_DECLARE_GLOBAL_LOCK (message_cache);
-/* 10-14 */
+/* index 10-11 */
 _DBUS_DECLARE_GLOBAL_LOCK (shared_connections);
-_DBUS_DECLARE_GLOBAL_LOCK (win_fds);
-_DBUS_DECLARE_GLOBAL_LOCK (sid_atom_cache);
 _DBUS_DECLARE_GLOBAL_LOCK (machine_uuid);
 
-#define _DBUS_N_GLOBAL_LOCKS (14)
+#define _DBUS_N_GLOBAL_LOCKS (12)
 
 dbus_bool_t _dbus_threads_init_debug (void);
 
index 04fb8d7..4e14ac3 100644 (file)
@@ -46,8 +46,6 @@
 #include <errno.h>
 #endif
 
-_DBUS_DEFINE_GLOBAL_LOCK (win_fds);
-_DBUS_DEFINE_GLOBAL_LOCK (sid_atom_cache);
 _DBUS_DEFINE_GLOBAL_LOCK (system_users);
 
 #ifdef DBUS_WIN
index 249f53f..43676bc 100644 (file)
@@ -489,8 +489,6 @@ init_locks (void)
   DBusRMutex ***dynamic_global_locks;
   DBusRMutex **global_locks[] = {
 #define LOCK_ADDR(name) (& _dbus_lock_##name)
-    LOCK_ADDR (win_fds),
-    LOCK_ADDR (sid_atom_cache),
     LOCK_ADDR (list),
     LOCK_ADDR (connection_slots),
     LOCK_ADDR (pending_call_slots),