소스 검색

fix build on non-linux systems which have pthread spinlocks

Samuel Thibault 9 년 전
부모
커밋
eed03ae8d8
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/common/thread.h

+ 2 - 1
src/common/thread.h

@@ -57,7 +57,6 @@ static inline int _starpu_pthread_spin_lock(starpu_pthread_spinlock_t *lock)
 	}
 	while (STARPU_UNLIKELY(prev));
 	return 0;
-#endif
 }
 #define starpu_pthread_spin_lock _starpu_pthread_spin_lock
 #endif
@@ -116,6 +115,8 @@ static inline int _starpu_pthread_spin_unlock(starpu_pthread_spinlock_t *lock)
 }
 #define starpu_pthread_spin_unlock _starpu_pthread_spin_unlock
 
+#endif /* defined(STARPU_SIMGRID) || (defined(STARPU_LINUX_SYS) && defined(STARPU_HAVE_XCHG)) || !defined(STARPU_HAVE_PTHREAD_SPIN_LOCK) */
+
 #endif /* __COMMON_THREAD_H__ */