Make the threaded RTS compilable using -fasm
[ghc-hetmet.git] / includes / OSThreads.h
index fd50642..32429b5 100644 (file)
 
 # if defined(HAVE_PTHREAD_H) && !defined(WANT_NATIVE_WIN32_THREADS)
 
+#if CMINUSMINUS
+
+#define ACQUIRE_LOCK(mutex) pthread_mutex_lock(mutex)
+#define RELEASE_LOCK(mutex) pthread_mutex_unlock(mutex)
+#define ASSERT_LOCK_HELD(mutex) /* nothing */
+
+#else
+
 #include <pthread.h>
 
 typedef pthread_cond_t  Condition;
@@ -68,6 +76,8 @@ typedef pthread_key_t   ThreadLocalKey;
 
 #endif
 
+#endif // CMINUSMINUS
+
 # elif defined(HAVE_WINDOWS_H)
 #include <windows.h>
 
@@ -137,6 +147,8 @@ typedef HANDLE Mutex;
 #  error "Threads not supported"
 # endif
 
+
+#ifndef CMINUSMINUS
 //
 // General thread operations
 //
@@ -174,6 +186,8 @@ void *getThreadLocalVar (ThreadLocalKey *key);
 void  setThreadLocalVar (ThreadLocalKey *key, void *value);
 void  freeThreadLocalKey (ThreadLocalKey *key);
 
+#endif // !CMINUSMINUS
+
 #else
 
 #define ACQUIRE_LOCK(l)