diff options
Diffstat (limited to 'exec.h')
-rw-r--r-- | exec.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -324,6 +324,7 @@ typedef int spinlock_t; #define SPIN_LOCK_UNLOCKED 0 +#if 1 static inline void spin_lock(spinlock_t *lock) { while (testandset(lock)); @@ -338,6 +339,20 @@ static inline int spin_trylock(spinlock_t *lock) { 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 extern spinlock_t tb_lock; |