From b759d528e2da53fb2cd535543e728ae914b09c64 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 16 Apr 2013 12:14:02 +0100 Subject: [PATCH 4/5] Remove unused global mutexes for win_fds, sid_atom_cache --- dbus/dbus-internals.h | 10 ++++------ dbus/dbus-sysdeps.c | 2 -- dbus/dbus-threads.c | 2 -- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index 28486a8..382630d 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -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); diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c index 04fb8d7..4e14ac3 100644 --- a/dbus/dbus-sysdeps.c +++ b/dbus/dbus-sysdeps.c @@ -46,8 +46,6 @@ #include #endif -_DBUS_DEFINE_GLOBAL_LOCK (win_fds); -_DBUS_DEFINE_GLOBAL_LOCK (sid_atom_cache); _DBUS_DEFINE_GLOBAL_LOCK (system_users); #ifdef DBUS_WIN diff --git a/dbus/dbus-threads.c b/dbus/dbus-threads.c index 9a505de..9fbbae5 100644 --- a/dbus/dbus-threads.c +++ b/dbus/dbus-threads.c @@ -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), -- 1.7.10.4