Hi,
I have to make an Human-Machine Interface in C++/OpenGL to monitor a system
made in Oz.
I have already coded the C++ part but i'm newbie in Oz programming, i don't
have to code lot of Oz but i must do the interfacing part.
I already understood the basics of interfacing Oz and C/C++
(OZ_C_proc_interface) but i don't know what is the best method to launch my
main loop (C++ part).
For the moment i export a function like this :
OZ_BI_define(cihm_launch, 0, 0)
{
pthread_t thread;
int iret = pthread_create(&thread, NULL, loop, (void*) NULL);
} OZ_BI_end
The problem is that Oz start to call other C functions before this thread is
really launched.
How to synchronize ?
I think it should be better to launch the thread in Oz, have it a method to
do this ?
(Maybe using OZ_makeRunnableThread. How to use it ?)
I'm interested to derivate a class from OZ_Extension, maybe it could solve
this problem and more,
in fact i do it, but i still continue to use OZ_C_proc_interface too.
I'm not sure to unterstand the purpose of OZ_Extension...
Please can you help me, with detailled Oz codes.
I already read "Reference Manuals - Interfacing to C and C++"
I need more detailed examples.
(I also serched in MOGUL for this kind of interfacing but i only find
"classical" C export)
That's all for now,
Thank You,
Julien.
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users