dutchuncle wrote on Tuesday, January 16, 2007:
>>There was in fact a bug … where a co-routine called a utility function … while interrupts were disabled. The utility function itself entered and exited a critical section - and in so doing resulted in interrupts being enabled when they should not have been … The utility macro was replaced with inlined code as the fix.
I have the vague memory that VRTX’s interrupt-entry macro incremented the critical-section depth counter to avoid this problem . . . or else the critical-section code saved the status register on the first level, using the depth counter from zero *down* to use the condition code *after* the operation (on 80x86)? Maybe I’m mixing up two. Point is, that should be handled.
While acknowledging the specific goal of processor-independence, I would also like to see more processor- and compiler-specific inlining (all of which of course defaults to common standard C code). Call me old-fashioned…