|
@@ -67,8 +67,6 @@ static inline void _starpu_pthread_spin_checklocked(starpu_pthread_spinlock_t *l
|
|
|
STARPU_ASSERT(lock->taken);
|
|
|
#elif defined(STARPU_LINUX_SYS) && defined(STARPU_HAVE_XCHG)
|
|
|
STARPU_ASSERT(lock->taken == 1 || lock->taken == 2);
|
|
|
-#elif defined(HAVE_PTHREAD_SPIN_LOCK)
|
|
|
- STARPU_ASSERT(pthread_spin_trylock((pthread_spinlock_t *)lock) != 0);
|
|
|
#else
|
|
|
STARPU_ASSERT(lock->taken);
|
|
|
#endif
|
|
@@ -115,8 +113,16 @@ static inline int _starpu_pthread_spin_unlock(starpu_pthread_spinlock_t *lock)
|
|
|
}
|
|
|
#define starpu_pthread_spin_unlock _starpu_pthread_spin_unlock
|
|
|
|
|
|
+#else /* defined(STARPU_SIMGRID) || (defined(STARPU_LINUX_SYS) && defined(STARPU_HAVE_XCHG)) || !defined(STARPU_HAVE_PTHREAD_SPIN_LOCK) */
|
|
|
+
|
|
|
+static inline void _starpu_pthread_spin_checklocked(starpu_pthread_spinlock_t *lock STARPU_ATTRIBUTE_UNUSED)
|
|
|
+{
|
|
|
+ STARPU_ASSERT(pthread_spin_trylock((pthread_spinlock_t *)lock) != 0);
|
|
|
+}
|
|
|
+
|
|
|
#endif /* defined(STARPU_SIMGRID) || (defined(STARPU_LINUX_SYS) && defined(STARPU_HAVE_XCHG)) || !defined(STARPU_HAVE_PTHREAD_SPIN_LOCK) */
|
|
|
|
|
|
+
|
|
|
#endif /* __COMMON_THREAD_H__ */
|
|
|
|
|
|
|