Mechanisms and techniques operate in a scalable or non-scalable processing
architecture computerized device to execute critical code while
overcoming interference from interruptions. A critical signal handler is
registered and a non-operating system thread sets a value of a critical
code register to indicate a critical execution condition. The
non-operating system thread then executes a critical code section until
an interruption occurs. In response to the interruption to the critical
code section, an operating system thread detects if the critical code
register is equivalent to a critical execution condition and if so, sets
the value of the critical code register to indicate a critical execution
failure. Upon returning to execution of the critical code section, the
critical code section attempts to execute a contingent instruction in the
critical code section that is contingent upon the value of the critical
code register. The attempted execution of the contingent instruction
triggers a critical trap signal when the critical code register is set to
a value that indicates the critical execution failure. The critical
execution signal handler processes the critical trap signal to avoid any
interference that may have been caused by the interruption.