Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
3d9ae0ef
Commit
3d9ae0ef
authored
Feb 22, 2006
by
kr.angelov@gmail.com
Browse files
support LOCK_DEBUG for Windows
parent
0ab0232d
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/includes/OSThreads.h
View file @
3d9ae0ef
...
...
@@ -90,6 +90,19 @@ typedef DWORD ThreadLocalKey;
#if USE_CRITICAL_SECTIONS
typedef
CRITICAL_SECTION
Mutex
;
#ifdef LOCK_DEBUG
#define ACQUIRE_LOCK(mutex) \
debugBelch("ACQUIRE_LOCK(0x%p) %s %d\n", mutex,__FILE__,__LINE__); \
EnterCriticalSection(mutex)
#define RELEASE_LOCK(mutex) \
debugBelch("RELEASE_LOCK(0x%p) %s %d\n", mutex,__FILE__,__LINE__); \
LeaveCriticalSection(mutex)
#define ASSERT_LOCK_HELD(mutex)
/* nothing */
#else
#define ACQUIRE_LOCK(mutex) EnterCriticalSection(mutex)
#define RELEASE_LOCK(mutex) LeaveCriticalSection(mutex)
...
...
@@ -97,6 +110,8 @@ typedef CRITICAL_SECTION Mutex;
// the right thing.
#define ASSERT_LOCK_HELD(mutex)
/* nothing */
#endif
#else
typedef
HANDLE
Mutex
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment