projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2005-10-27 08:00:03 by simonmar]
[ghc-hetmet.git]
/
ghc
/
rts
/
win32
/
OSThreads.c
diff --git
a/ghc/rts/win32/OSThreads.c
b/ghc/rts/win32/OSThreads.c
index
e4cd76b
..
5559765
100644
(file)
--- a/
ghc/rts/win32/OSThreads.c
+++ b/
ghc/rts/win32/OSThreads.c
@@
-137,9
+137,13
@@
getThreadLocalVar (ThreadLocalKey *key)
{
void *r;
r = TlsGetValue(*key);
{
void *r;
r = TlsGetValue(*key);
- if (r == NULL) {
+#ifdef DEBUG
+ // r is allowed to be NULL - it can mean that either there was an
+ // error or the stored value is in fact NULL.
+ if (GetLastError() != NO_ERROR) {
barf("getThreadLocalVar: key not found");
}
barf("getThreadLocalVar: key not found");
}
+#endif
return r;
}
return r;
}