make lookupSymbol threadsafe, so loading doesn't block all threads on systems without an IO manager thread (win32)

This commit is contained in:
Don Stewart 2006-10-23 02:38:44 +00:00
parent a1b9782556
commit 748afc256e
2 changed files with 5 additions and 4 deletions

View File

@ -675,7 +675,7 @@ getImports m = do
-- ---------------------------------------------------------------------
-- C interface
--
foreign import ccall unsafe "lookupSymbol"
foreign import ccall threadsafe "lookupSymbol"
c_lookupSymbol :: CString -> IO (Ptr a)
foreign import ccall unsafe "loadObj"

View File

@ -43,6 +43,7 @@ data Module = Module { path :: !FilePath
, iface :: Iface -- cache the iface
, key :: Key
}
instance Ord Module where
compare m1 m2 = mname m1 `compare` mname m2