summaryrefslogtreecommitdiffstats
path: root/dbus
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2006-08-18 15:46:59 +0000
committerJohn (J5) Palmieri <johnp@redhat.com>2006-08-18 15:46:59 +0000
commit7cd52919443f190fa1601a3d1bac5c8ce8d9ecc1 (patch)
treea64ecefa2f5115e67097d1b51aaebec9bad86237 /dbus
parent711c065e5965cdf7a5869ecc3c3d43fb0dede34d (diff)
Patch provided by Ralf Habacker (ralf dot habacker at freenet dot de)
* dbus/dbus-sysdeps.c, dbus/dbus-threads.c, dbus/dbus-internals.h: Add two more global locks for use on windows platforms. These are unused on non-windows platforms but are not ifdefed out to avoid potential bugs (i.e. the few bytes lost does not warrent the extra maintanence and complexity that having seperate sets of locks would cause)
Diffstat (limited to 'dbus')
-rw-r--r--dbus/dbus-internals.h4
-rw-r--r--dbus/dbus-sysdeps.c3
-rw-r--r--dbus/dbus-threads.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h
index 5d0d2498..9deee993 100644
--- a/dbus/dbus-internals.h
+++ b/dbus/dbus-internals.h
@@ -281,7 +281,9 @@ _DBUS_DECLARE_GLOBAL_LOCK (shutdown_funcs);
_DBUS_DECLARE_GLOBAL_LOCK (system_users);
_DBUS_DECLARE_GLOBAL_LOCK (message_cache);
_DBUS_DECLARE_GLOBAL_LOCK (shared_connections);
-#define _DBUS_N_GLOBAL_LOCKS (11)
+_DBUS_DECLARE_GLOBAL_LOCK (win_fds);
+_DBUS_DECLARE_GLOBAL_LOCK (sid_atom_cache);
+#define _DBUS_N_GLOBAL_LOCKS (13)
dbus_bool_t _dbus_threads_init_debug (void);
diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c
index 20ff014f..0a97a1d8 100644
--- a/dbus/dbus-sysdeps.c
+++ b/dbus/dbus-sysdeps.c
@@ -69,6 +69,9 @@
#define socklen_t int
#endif
+_DBUS_DEFINE_GLOBAL_LOCK (win_fds);
+_DBUS_DEFINE_GLOBAL_LOCK (sid_atom_cache);
+
/**
* @addtogroup DBusInternalsUtils
* @{
diff --git a/dbus/dbus-threads.c b/dbus/dbus-threads.c
index 78269634..7d7646e2 100644
--- a/dbus/dbus-threads.c
+++ b/dbus/dbus-threads.c
@@ -405,6 +405,8 @@ init_locks (void)
DBusMutex **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),