From 23fab4f1bbb71e5df3aac24680f7341f3fc00ff0 Mon Sep 17 00:00:00 2001 From: sletz Date: Wed, 8 Oct 2008 15:30:25 +0000 Subject: [PATCH] Fix a SMP related bug introduced in rev 2957 : remove the __SMP__ flag and define LOCK for SMP in all cases. git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2965 0c269be4-1314-0410-8aa9-9f06e86f4224 --- ChangeLog | 4 ++++ common/JackAtomic.h | 1 - linux/JackAtomic_os.h | 6 +----- macosx/JackAtomic_os.h | 6 +----- windows/JackAtomic_os.h | 6 +----- wscript | 1 - 6 files changed, 7 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 88223b3d..9c8461ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,10 @@ Michael Voigt Jackdmp changes log --------------------------- +2008-10-08 Stephane Letz + + * Fix a SMP related bug introduced in rev 2957 : remove the __SMP__ flag and define LOCK for SMP in all cases. + 2008-10-02 Stephane Letz * Correct file permission for jack-shm-registry POSIX shared memory segment. diff --git a/common/JackAtomic.h b/common/JackAtomic.h index 1da0cb63..481e17f3 100644 --- a/common/JackAtomic.h +++ b/common/JackAtomic.h @@ -21,7 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define __JackAtomic__ #include "JackTypes.h" - #include "JackAtomic_os.h" static inline long INC_ATOMIC(volatile SInt32* val) diff --git a/linux/JackAtomic_os.h b/linux/JackAtomic_os.h index 4b62d220..b69cb22a 100644 --- a/linux/JackAtomic_os.h +++ b/linux/JackAtomic_os.h @@ -52,11 +52,7 @@ static inline int CAS(register UInt32 value, register UInt32 newvalue, register #if defined(__i386__) || defined(__x86_64__) -#ifdef __SMP__ -# define LOCK "lock ; " -#else -# define LOCK "" -#endif +#define LOCK "lock ; " static inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void* addr) { diff --git a/macosx/JackAtomic_os.h b/macosx/JackAtomic_os.h index f02fad47..bd88a223 100644 --- a/macosx/JackAtomic_os.h +++ b/macosx/JackAtomic_os.h @@ -52,11 +52,7 @@ static inline int CAS(register UInt32 value, register UInt32 newvalue, register #if defined(__i386__) || defined(__x86_64__) -#ifdef __SMP__ -# define LOCK "lock ; " -#else -# define LOCK "" -#endif +#define LOCK "lock ; " static inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void* addr) { diff --git a/windows/JackAtomic_os.h b/windows/JackAtomic_os.h index 38947437..0a393f7a 100644 --- a/windows/JackAtomic_os.h +++ b/windows/JackAtomic_os.h @@ -55,11 +55,7 @@ inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void * addr) #else -#ifdef __SMP__ -# define LOCK "lock ; " -#else -# define LOCK "" -#endif +#define LOCK "lock ; " static inline char CAS(volatile UInt32 value, UInt32 newvalue, volatile void* addr) { diff --git a/wscript b/wscript index afbc5e69..351f126f 100644 --- a/wscript +++ b/wscript @@ -105,7 +105,6 @@ def configure(conf): conf.define('ADDON_DIR', os.path.normpath(conf.env['PREFIX'] + '/lib/jack')) conf.define('JACK_LOCATION', os.path.normpath(conf.env['PREFIX'] + '/bin')) - conf.define('__SMP__', 1) conf.define('USE_POSIX_SHM', 1) conf.define('JACKMP', 1) if conf.env['BUILD_JACKDBUS'] == True: