make lookupSymbol threadsafe, so loading doesn't block all threads on systems without an IO manager thread (win32)
This commit is contained in:
parent
a1b9782556
commit
748afc256e
@ -675,7 +675,7 @@ getImports m = do
|
|||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- C interface
|
-- C interface
|
||||||
--
|
--
|
||||||
foreign import ccall unsafe "lookupSymbol"
|
foreign import ccall threadsafe "lookupSymbol"
|
||||||
c_lookupSymbol :: CString -> IO (Ptr a)
|
c_lookupSymbol :: CString -> IO (Ptr a)
|
||||||
|
|
||||||
foreign import ccall unsafe "loadObj"
|
foreign import ccall unsafe "loadObj"
|
||||||
|
@ -37,12 +37,13 @@ type Type = String
|
|||||||
type Errors = [String]
|
type Errors = [String]
|
||||||
type PackageConf = FilePath
|
type PackageConf = FilePath
|
||||||
|
|
||||||
data Module = Module { path :: !FilePath
|
data Module = Module { path :: !FilePath
|
||||||
, mname :: !String
|
, mname :: !String
|
||||||
, kind :: !ObjType
|
, kind :: !ObjType
|
||||||
, iface :: Iface -- cache the iface
|
, iface :: Iface -- cache the iface
|
||||||
, key :: Key
|
, key :: Key
|
||||||
}
|
}
|
||||||
|
|
||||||
instance Ord Module where
|
instance Ord Module where
|
||||||
compare m1 m2 = mname m1 `compare` mname m2
|
compare m1 m2 = mname m1 `compare` mname m2
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user