Patch for buildings hugs with pthreads

Sven Panne Sven.Panne at informatik.uni-muenchen.de
Sun Jul 8 13:34:15 EDT 2001


Antony Courtney wrote:
>[...]  We are currently working on a novel mechanism for mapping Java
> method names to Haskell function names; when that is complete, we plan
> to make this system available to the community.

It might be a good idea to join the Haskell Foreign Function Interface
(FFI) mailing list (http://haskell.org/mailman/listinfo/ffi) for anybody
interested in this kind of stuff. Apart from some occasional syntactic
Jihads, it's quite low-volume. The new design is intended to accommodate
various languages apart from C, e.g. SPJ is working on a .NET binding IIRC,
which probably has very similar problems as a one for Java (overloading,
exceptions, etc.). A draft document is available at

   http://www.cse.unsw.edu.au/~chak/haskell/ffi.ps.gz

and

   http://www.cse.unsw.edu.au/~chak/haskell/ffi.tex

The Java part is almost nonexistent yet and has only been discussed very
superficially, so any help and suggestions are highly appreciated.

> However, because the Java VM is multi-threaded, I had to rebuild Hugs from
> sources under Linux to use the multi-threaded version of the C library.  The
> changes were very minor:
>         - Pass the -D_REENTRANT flag to CC
>         - Add -lpthread to LIBS for linking
>         - #define DONT_PANIC to avoid catching signals used by the user-space
>           LinuxThreads implementation.

Hmmm, things are a little bit different on Solaris IIRC, but I don't have
the relevant man pages at hand. I'll have a look tomorrow...

Cheers,
   Sven.




More information about the FFI mailing list