|
From: <sv...@va...> - 2009-07-21 11:13:09
|
Author: bart
Date: 2009-07-21 12:12:59 +0100 (Tue, 21 Jul 2009)
New Revision: 10498
Log:
Compiles now on Darwin.
Modified:
trunk/drd/tests/tsan_thread_wrappers_pthread.h
trunk/drd/tests/tsan_unittest.cpp
Modified: trunk/drd/tests/tsan_thread_wrappers_pthread.h
===================================================================
--- trunk/drd/tests/tsan_thread_wrappers_pthread.h 2009-07-21 11:12:14 UTC (rev 10497)
+++ trunk/drd/tests/tsan_thread_wrappers_pthread.h 2009-07-21 11:12:59 UTC (rev 10498)
@@ -51,7 +51,7 @@
#include <stdio.h>
#include <limits.h> // INT_MAX
-#ifdef _APPLE_
+#ifdef __APPLE__
#include <libkern/OSAtomic.h>
#define NO_BARRIER
#define NO_TLS
@@ -105,7 +105,7 @@
#ifndef NO_SPINLOCK
/// helgrind does not (yet) support spin locks, so we annotate them.
-#ifndef _APPLE_
+#ifndef __APPLE__
class SpinLock {
public:
SpinLock() {
@@ -150,7 +150,7 @@
private:
OSSpinLock mu_;
};
-#endif // _APPLE_
+#endif // __APPLE__
#endif // NO_SPINLOCK
@@ -588,7 +588,7 @@
int AtomicIncrement(volatile int *value, int increment);
-#ifndef _APPLE_
+#ifndef __APPLE__
inline int AtomicIncrement(volatile int *value, int increment) {
return __sync_add_and_fetch(value, increment);
}
@@ -607,7 +607,7 @@
*out = memalign(al, size);
return (*out == 0);
}
-#endif // _APPLE_
+#endif // __APPLE__
#endif // THREAD_WRAPPERS_PTHREAD_H
// vim:shiftwidth=2:softtabstop=2:expandtab:foldmethod=marker
Modified: trunk/drd/tests/tsan_unittest.cpp
===================================================================
--- trunk/drd/tests/tsan_unittest.cpp 2009-07-21 11:12:14 UTC (rev 10497)
+++ trunk/drd/tests/tsan_unittest.cpp 2009-07-21 11:12:59 UTC (rev 10498)
@@ -93,7 +93,7 @@
#include <stdlib.h>
#include <dirent.h>
-#ifndef _APPLE_
+#ifndef __APPLE__
#include <malloc.h>
#endif
|