projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make dependencies of source files on Makefiles disableable
[ghc-hetmet.git]
/
includes
/
OSThreads.h
diff --git
a/includes/OSThreads.h
b/includes/OSThreads.h
index
32429b5
..
9a3b5aa
100644
(file)
--- a/
includes/OSThreads.h
+++ b/
includes/OSThreads.h
@@
-79,6
+79,15
@@
typedef pthread_key_t ThreadLocalKey;
#endif // CMINUSMINUS
# elif defined(HAVE_WINDOWS_H)
#endif // CMINUSMINUS
# elif defined(HAVE_WINDOWS_H)
+
+#if CMINUSMINUS
+
+#define ACQUIRE_LOCK(mutex) EnterCriticalSection(mutex)
+#define RELEASE_LOCK(mutex) LeaveCriticalSection(mutex)
+#define ASSERT_LOCK_HELD(mutex) /* nothing */
+
+#else
+
#include <windows.h>
typedef HANDLE Condition;
#include <windows.h>
typedef HANDLE Condition;
@@
-143,6
+152,8
@@
typedef HANDLE Mutex;
#define ASSERT_LOCK_HELD(mutex) /* nothing */
#endif
#define ASSERT_LOCK_HELD(mutex) /* nothing */
#endif
+#endif // CMINUSMINUS
+
# else
# error "Threads not supported"
# endif
# else
# error "Threads not supported"
# endif