??? 01/08/07 21:26 Read: times |
#130456 - questions and answers Responding to: ???'s previous message |
Neil Kurzman said:
Let use say the compiler disables interupts to make an operation atomic "automaticlly". Now it must keep track of other disables as not to screw up the state. [...] To disable interrupts when manipulating a "critical" variable is none the worse than the present state, when whole functions are disabled (by explicit use of appropriate pragma in both compilers) when they contain operations with "critical" variables. Neil Kurzman said:
But you know the code / hardware will never let it interfere. Now what to disable all interupts, one or two of them?
Maybe a bit flag as a semiphore is better. which to use? how to tell the compiler leave it alone I have this one? Maybe I won't answer all your questions, but I try at least:
I think people are happy if they are helped and I believe even seasoned programmers like to be helped. I might be wrong of course, due to my innate naivity and stupidity :-) JW |