X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fposix%2FFileLock.c;h=26e9de4dc2a866c95e8334535ffbcc37088dbb88;hb=1c45176f3b9be75b5c4744d9ef074430bf034e3f;hp=e871be5ee0e627b6666e527414acb562c73ab190;hpb=e345a13029b7654730a4d8f6be730e8b96812a27;p=ghc-hetmet.git diff --git a/rts/posix/FileLock.c b/rts/posix/FileLock.c index e871be5..26e9de4 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