Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Scheduling thread problem kernel 2.6
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe Raffalli <Christophe.Raffalli@u...>
Subject: Re: [Caml-list] Scheduling thread problem kernel 2.6
Daniel Bünzli wrote:
> 
> Le 14 avr. 04, à 07:58, Christophe Raffalli a écrit :
> 
>> I do not understand ? First I launch the interface thread from Caml with
>> Thread.create and the interface thread calls Glut.main_loop which 
>> never ends (except when the program terminates). This main loop call 
>> some Caml functions.
> 
> 
> My understanding is that the Glut.main_loop stub should be something like
> 
> #include <caml/signals.h>
> 
> CAMLprim value ocaml_glutMainLoop(value v)
> {
>     enter_blocking_section();
>     glutMainLoop();
>     leave_blocking_section(); /* This will in fact never be called */
>     return Val_unit;
> }

No it does not enter a blocking section (I checked the code of 
LablGlut). Moreover, if it was the case, Glsurf would never have worked 
correcdtly under kernel 2.4. You do not need in general to enter a 
blocking section when calling C. you only need that if you call some 
specific Caml function from C (if I remember well)



-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature
---------------------------------------------