diff options
author | Ian Lynagh <igloo@earth.li> | 2009-01-17 02:39:47 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-01-17 02:39:47 +0000 |
commit | b2391c27ecf7163cc2b08697742c8fa20783ea3c (patch) | |
tree | 28cb11f683dab824397f0224fb2ae556061855a9 /rts | |
parent | c91e9cf11cc855ba54b503a0f37b05d5e40a92b8 (diff) | |
download | haskell-b2391c27ecf7163cc2b08697742c8fa20783ea3c.tar.gz |
Initialise and deinitialise the file_lock_mutex
Diffstat (limited to 'rts')
-rw-r--r-- | rts/posix/FileLock.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/posix/FileLock.c b/rts/posix/FileLock.c index e871be5ee0..26e9de4dc2 100644 --- 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 |