projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c91e9cf
)
Initialise and deinitialise the file_lock_mutex
author
Ian Lynagh
<igloo@earth.li>
Sat, 17 Jan 2009 02:39:47 +0000
(
02:39
+0000)
committer
Ian Lynagh
<igloo@earth.li>
Sat, 17 Jan 2009 02:39:47 +0000
(
02:39
+0000)
rts/posix/FileLock.c
patch
|
blob
|
history
diff --git
a/rts/posix/FileLock.c
b/rts/posix/FileLock.c
index
e871be5
..
26e9de4
100644
(file)
--- a/
rts/posix/FileLock.c
+++ b/
rts/posix/FileLock.c
@@
-52,6
+52,9
@@
initFileLocking(void)
{
obj_hash = allocHashTable_(hashLock, cmpLocks);
fd_hash = allocHashTable(); /* ordinary word-based table */
+#ifdef THREADED_RTS
+ initMutex(&file_lock_mutex);
+#endif
}
static void
@@
-65,6
+68,9
@@
freeFileLocking(void)
{
freeHashTable(obj_hash, freeLock);
freeHashTable(fd_hash, NULL);
+#ifdef THREADED_RTS
+ closeMutex(&file_lock_mutex);
+#endif
}
int