*
* ---------------------------------------------------------------------------*/
+#include "PosixSource.h"
#include "Rts.h"
-#include "Hash.h"
+
#include "FileLock.h"
+#include "Hash.h"
#include "RtsUtils.h"
-#include "OSThreads.h"
-#include <unistd.h>
+#include <sys/types.h>
#include <sys/stat.h>
+#include <unistd.h>
#include <errno.h>
typedef struct {
{
obj_hash = allocHashTable_(hashLock, cmpLocks);
fd_hash = allocHashTable(); /* ordinary word-based table */
+#ifdef THREADED_RTS
+ initMutex(&file_lock_mutex);
+#endif
}
static void
{
freeHashTable(obj_hash, freeLock);
freeHashTable(fd_hash, NULL);
+#ifdef THREADED_RTS
+ closeMutex(&file_lock_mutex);
+#endif
}
int