RE: [Caml-list] Problem with try_lock on win32.

2010-01-27 Thread David Allsopp
Romain Beauxis: > I have a problem with the following code under win32: > > let m = Mutex.create () > > let () = > Mutex.lock m; > if Mutex.try_lock m then > Printf.printf "locked !\n" > else > Printf.printf "could not lock!\n" This code is behaving correctly for a Windows mutex (A

[Caml-list] Alignment of data

2010-01-27 Thread Christophe Papazian
Dear users and developers of OCAML, I am working on some ppc architecture, and I realize that I have a (very) big slowdown due to bad alignment of data by ocamlopt. I need to have my data aligned in memory depending of the size of the data : floats are to be aligned on 8 bytes, int on 4 byt

[Caml-list] dynamic link library path under mingw

2010-01-27 Thread Matthieu Dubuget
Hello, I'm doing something wrong, but can't figure out what? *** Library compilation, in libeeproms/: This is a mixed ocaml/c library, and it depends on a third party DLL *** $ ocamlc -c eprom_stubs.c $ ocamlmklib -o m2mEeproms e

Re: [Caml-list] Problem with try_lock on win32.

2010-01-27 Thread Romain Beauxis
Hi ! Le mercredi 27 janvier 2010 02:23:25, David Allsopp a écrit : > Romain Beauxis: > > I have a problem with the following code under win32: > > > > let m = Mutex.create () > > > > let () = > > Mutex.lock m; > > if Mutex.try_lock m then > > Printf.printf "locked !\n" > > else

Re: [Caml-list] OCaml on AIX

2010-01-27 Thread Dawid Toton
Christoph Bauer pisze: Please try: $ cd asmrun $ cpp -DSYS_aix power-aix.S > power-aix.s $ as -u power-aix.s $ cd .. $ make opt Christoph Bauer Apparently I can go directly without preprocessor (and cpp I have on the AIX machine doesn't like asm syntax): $ cp power-aix.S power-aix.s $ a

Re: [Caml-list] Alignment of data

2010-01-27 Thread Goswin von Brederlow
Christophe Papazian writes: > Dear users and developers of OCAML, > > I am working on some ppc architecture, and I realize that I have a > (very) big slowdown due to bad alignment of data by ocamlopt. I need > to have my data aligned in memory depending of the size of the data : > floats are to b

Re: [Caml-list] Alignment of data

2010-01-27 Thread Xavier Leroy
I am working on some ppc architecture, and I realize that I have a (very) big slowdown due to bad alignment of data by ocamlopt. I need to have my data aligned in memory depending of the size of the data : floats are to be aligned on 8 bytes, int on 4 bytes, etc First, make sure that misal

Re: [Caml-list] dynamic link library path under mingw

2010-01-27 Thread Xavier Leroy
I'm doing something wrong, but can't figure out what? Try setting the OCAMLRUNPARAMS environment variable to the value "v=256". The run-time system will then print additional debug messages concerning DLL searching and loading. - Xavier Leroy ___ Cam

Re: [Caml-list] dynamic link library path under mingw [NC]

2010-01-27 Thread Matthieu Dubuget
Original Message Subject: Re: [Caml-list] dynamic link library path under mingw [NC] From: Rabih EL-CHAAR To: matthieu.dubu...@gmail.com Date: 27/01/2010 15:36 Why you're not using -dllpath option in ocamlmklib? I think this should solve your problem (didn't make the check).

[Caml-list] Alignment of data

2010-01-27 Thread Pascal Cuoq
Goswin von Brederlow wrote: You need to write a new function CAMLextern value caml_alloc_double_array (mlsize_t), or similar that ensures alignment on 8 byte for double even for 32bit systems. You should also check the CAMLextern value caml_copy_double (double); that it does the same. If

Re: [Caml-list] dynamic link library path under mingw

2010-01-27 Thread Matthieu Dubuget
From: Xavier Leroy Try setting the OCAMLRUNPARAMS environment variable to the value "v=256". The run-time system will then print additional debug messages concerning DLL searching and loading. - Xavier Leroy OCAMLRUNPARAM without S! Thanks for the tip. $ OCAMLRUNPARAM="v=256" ./tests.by

[Caml-list] Alignment of data

2010-01-27 Thread Christophe Papazian
Dear Xavier Leroy, thank you for your answer I am working on some ppc architecture, and I realize that I have a (very) big slowdown due to bad alignment of data by ocamlopt. I need to have my data aligned in memory depending of the size of the data : floats are to be aligned on 8 bytes, int

Re: [Caml-list] dynamic link library path under mingw

2010-01-27 Thread Matthieu Dubuget
Matthieu Dubuget: Two separated problems, then: - how to store a search path into tests.byte? The use of -dllpath when generating tests.byte does it. I wanted to add this path during library generation, not when using it. Anyway. This is not the biggest problem: I will use ocamlfind, that mai

Re: [Caml-list] Alignment of data

2010-01-27 Thread Richard Jones
On Wed, Jan 27, 2010 at 06:20:44PM +0100, Christophe Papazian wrote: > Is there a 64-bit PowerPC Linux (ELF) support in ocaml ? I thought > it was only a 64-bit PowerPC OSX (Darwin) support... Yes indeed there is. For years we maintained an out of tree patch to support this for Fedora/ppc64: htt

Re: [Caml-list] Alignment of data

2010-01-27 Thread Goswin von Brederlow
Pascal Cuoq writes: > Goswin von Brederlow wrote: > > > You need to write a new function > > CAMLextern value caml_alloc_double_array (mlsize_t), > > or similar that ensures alignment on 8 byte for double even for 32bit > systems. > > You should also check the CAMLextern valu