]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Some source code modifications that should help getting tsan_unittest.cpp compiled...
authorBart Van Assche <bvanassche@acm.org>
Tue, 2 Jun 2009 15:11:42 +0000 (15:11 +0000)
committerBart Van Assche <bvanassche@acm.org>
Tue, 2 Jun 2009 15:11:42 +0000 (15:11 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10214

drd/tests/tsan_thread_wrappers_pthread.h
drd/tests/tsan_unittest.cpp

index 1b5b3d31318b1eb22f59be1b409af31ed91a4703..84ae17ae50fcb45c33dafb82b601c14efbfe18ed 100644 (file)
 #include <stdio.h>
 #include <limits.h>   // INT_MAX
 
-#ifdef OS_MACOSX
+#ifdef _APPLE_
 #include <libkern/OSAtomic.h>
+#define NO_BARRIER
+#define NO_TLS
 #endif
 
 #include <string>
@@ -105,7 +107,7 @@ class CondVar;
 #ifndef NO_SPINLOCK
 /// helgrind does not (yet) support spin locks, so we annotate them.
 
-#ifndef OS_MACOSX
+#ifndef _APPLE_
 class SpinLock {
  public:
   SpinLock() {
@@ -150,7 +152,7 @@ class SpinLock {
  private:
   OSSpinLock mu_;
 };
-#endif // OS_MACOSX
+#endif // _APPLE_
 
 #endif // NO_SPINLOCK
 
@@ -587,7 +589,7 @@ class BlockingCounter {
 
 int AtomicIncrement(volatile int *value, int increment);
 
-#ifndef OS_MACOSX
+#ifndef _APPLE_
 inline int AtomicIncrement(volatile int *value, int increment) {
   return __sync_add_and_fetch(value, increment);
 }
@@ -606,7 +608,7 @@ int posix_memalign(void **out, size_t al, size_t size) {
   *out = memalign(al, size);
   return (*out == 0);
 }
-#endif // OS_MACOSX
+#endif // _APPLE_
 
 #endif // THREAD_WRAPPERS_PTHREAD_H
 // vim:shiftwidth=2:softtabstop=2:expandtab:foldmethod=marker
index 9b31cc44997f24d36d30002520fb5745b9bb280e..dc6f6a759f7cd34fdc6a788894acdd8b4b18559c 100644 (file)
@@ -85,7 +85,7 @@
 #include <stdlib.h>
 #include <dirent.h>
 
-#ifndef OS_MACOSX
+#ifndef _APPLE_
 #include <malloc.h>
 #endif