From 9293e823767daee79386cc797510808f4eed01a3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 19 May 2009 22:30:14 +0200 Subject: atomic: implement atomic operations based on gcc's __sync extension Newer gccs and intel ccs support a __sync extension for making use of atomic operations. This patch replaces the handcrafted x86 atomic operation support with usage of __sync. __sync is supported by more processors and by more compilers than the old assembler code. Also, this extension has been available on gcc for quite a while now for x86, so replacing the old assembler code should only be a loss when very old compiilers are used. --- dbus/dbus-threads.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dbus/dbus-threads.c') diff --git a/dbus/dbus-threads.c b/dbus/dbus-threads.c index 00c1a4b1..cb9c7237 100644 --- a/dbus/dbus-threads.c +++ b/dbus/dbus-threads.c @@ -424,7 +424,9 @@ init_locks (void) LOCK_ADDR (pending_call_slots), LOCK_ADDR (server_slots), LOCK_ADDR (message_slots), +#if !DBUS_USE_SYNC LOCK_ADDR (atomic), +#endif LOCK_ADDR (bus), LOCK_ADDR (bus_datas), LOCK_ADDR (shutdown_funcs), -- cgit