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: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] Scheduling thread problem kernel 2.6
	
Le 14 avr. 04, à 11:21, Christophe Raffalli a écrit :

> 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)

True, this message [1] confirms it (point 6) and since callbacks are 
not executed concurrently by glut there is no need to serialize them 
with enter/leave_block_section(). Apparently [2] 
enter/leave_blocking_section() are mainly used to allow the execution 
of signal callbacks during execution of long running C code that 
doesn't interact with caml code (this means that if I use the lablglut 
bindings, my signal callbacks will never be executed, so I think it 
would be better to use enter/leave_blocking_section() in the bindings 
as depicted in my previous message).

Regarding your problem, maybe glutMainLoop() is doing busy waiting. You 
can try to look into the code [3], glutMainLoop() is implemented in 
file lib/glut/glut_event.c. However this wouldn't explain the fact that 
your program was running well in another version of your system.

Daniel

[1] <http://caml.inria.fr/archives/200404/msg00258.html>
[2] <http://caml.inria.fr/archives/200304/msg00243.html>
[3] <http://www.opengl.org/resources/libraries/glut/glut37.zip>
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners