Concurrency issue with dynamic linker in GHC

Vyacheslav Akhmechet coffeemug at gmail.com
Sun Oct 22 23:20:47 EDT 2006


Bulat: I didn't get the chance to use the streams library yet, but
could you explain how it would solve my locking problem? The core
problem that the runtime under Win32 doesn't have an IO manager still
remains, correct?

Is anyone looking to fix this issue? If not, how hard would it be for
me to fix it? I'd like to get my hands dirty with GHC but I don't
think I'll be able to do it without a lot of direction.

Thanks,
 - Slava.

On 10/22/06, Donald Bruce Stewart <dons at cse.unsw.edu.au> wrote:
> bulat.ziganshin:
> > Hello Donald,
> >
> > Sunday, October 22, 2006, 9:04:02 AM, you wrote:
> >
> > >> can't you define this call as 'safe'?
> >
> > > But is it safe. Hmm.... I get kind of queasy when mucking about in the rts.
> >
> > i don't understand you (because of my weak English).
> >
> > 'safe' specifier is just says that function should be called in _safe_
> > way that will allow to continue execute other Haskell threads. for
> > functions declared as 'unsafe' GHC uses simplified call method that
> > freezes execution of all Haskell threads until called function will
> > return
> >
> > look for details in http://www.haskell.org/~simonmar/papers/conc-ffi.pdf
>
> Yes, I understand this. I just don't know how safe it is to have other
> threads continue executing while I'm swapping code in and out of the
> system...
>
> > >     foreign import ccall unsafe "lookupSymbol"
> > >        c_lookupSymbol :: CString -> IO (Ptr a)
>
> This could be safe, then, for other threads to continue. Yes.
>
> -- Don
>


More information about the Glasgow-haskell-users mailing list