though we'd like too avoid global variables entirely, in real-time systems they are sometimes unavoidable. Nothing is faster than a global flag. When speed is truly an issue, a few,very few, globals may be required. Restrict their use to a few critical areas. I feel that defining a global variable is such a source of problems that the team leader should approve every one.
Jack Ganssle, AArt oOF Embeddedembedded SystemsSystems











