To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1637
    Re: pass by refrence or value? —Michael Cambay
   Did you care to declare your global variable as volatile? this (normaly) prevent the compiler to optimize memory access and force it to read the actual value of the variable each time it need it ( instead of localy storing it in a register wich will (...) (24 years ago, 18-Jan-01, to lugnet.robotics.rcx.legos)
   
        Re: pass by refrence or value? —Jakob Engblom
   Some basic facts about C semantics: As already stated, globals MUST be volatile if they are accessed by more than one thread, otherwise reads and writes can be out of sync. What are the types of the variables involved? Scalar values like integers (...) (23 years ago, 25-Mar-01, to lugnet.robotics.rcx.legos)
 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR