Oz and Mozart Users Mailing List

Oz thread switching and native modules


From: Aleksander Salwa (ololo@zeus.polsl.gliwice.pl)
Date: Thu Aug 09 2001 - 15:42:34 CEST


I'm writing library with native module in C++. Now I work on Linux, but I
have to port this application to Win32.
On Linux, I had trouble when calling operating system functions -
occasionally they were terminated by SIGALRM. I have guessed that it is
used internally by Mozart to implement thread switching. I found a
workaround: I call "sigaction (2)" to ignore this signal, then make OS
call, and immediatelly after that I restore original handler.
I know that it blocks entire Oz system till completion of my native code,
but I can bear it.

Now, the question is: how can I do this on Windows ? What mechanism is
used on Windows to implement Oz task switching ? Maybe there is no problem
at all, because on Win32 OS calls aren't interrupted in such case ?

ololo@zeus.polsl.gliwice.pl asalwa@webcraft.pl oleks@helper.pl ICQ#:108588073
o---------------------------------------------------------------------------o
        "When a man lies he murders some part of the world [...]
             all this I cannot bear to witness any longer"

-
Please send submissions to users@mozart-oz.org
and administriva mail to users-request@mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.



This archive was generated by hypermail 2b29.