--- SheepShaver/src/Unix/sysdeps.h 2004/05/20 17:46:49 1.31 +++ SheepShaver/src/Unix/sysdeps.h 2004/06/02 16:11:49 1.32 @@ -249,7 +249,8 @@ static inline int testandset(volatile in } #endif -#if defined(__i386__) || defined(__x86_64__) +/* FIXME: SheepShaver occasionnally hangs with those locks */ +#if 0 && (defined(__i386__) || defined(__x86_64__)) #define HAVE_TEST_AND_SET 1 static inline int testandset(volatile int *p) { @@ -328,12 +329,12 @@ static inline int testandset(volatile in #endif /* __GNUC__ */ -#if HAVE_TEST_AND_SET -#define HAVE_SPINLOCKS 1 typedef volatile int spinlock_t; static const spinlock_t SPIN_LOCK_UNLOCKED = 0; +#if HAVE_TEST_AND_SET +#define HAVE_SPINLOCKS 1 static inline void spin_lock(spinlock_t *lock) { while (testandset(lock)); @@ -348,6 +349,19 @@ static inline int spin_trylock(spinlock_ { return !testandset(lock); } +#else +static inline void spin_lock(spinlock_t *lock) +{ +} + +static inline void spin_unlock(spinlock_t *lock) +{ +} + +static inline int spin_trylock(spinlock_t *lock) +{ + return 1; +} #endif // Time data type for Time Manager emulation