Static variables

New Message Reply Date view Thread view Subject view Author view

Andreas Brendstuen (abrend++at++idt.unit.no)
Wed, 20 Dec 1995 18:00:38 +0100


I am trying to use the functions in the env.* files that lies in the
common directory (for perfly etc..)

fog and fogColor are variables that are defined as static global in
the env.c file. The initEnvironment function initiate these variable
and if fog is not off, the updateTimeOfDay function updates them. My
problem occurs when I'm testing my application on an Onyx with 4
cpus. I call the initEnvironment when initializing and then
updateTimeOfDay when I change the time of day. updateTimeOfDay uses
the static variables, but when I check them, fog is NULL and fogColor
is 0.0, 0.0, 0.0 (they are set to 1.0, 1.0, 1.0 in initEnvironment).
Testing on an Indigo with one cpu, I don't have this problem.

        _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
       _/ Andreas Brendstuen _/ abrend++at++idt.unit.no _/
      _/ _/ http://www.idt.unit.no:80/~abrend _/
     _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:10 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.