22.8.1.2.2 Workflow

  1. Enter a critical section to disable global interrupts.
    system_interrupt_enter_critical_section();
    
    Note: Critical sections may be nested if desired; if nested, global interrupts will only be re-enabled once the outer-most critical section has completed.
  2. Check a global shared flag and perform a response. This code may be any critical code that requires exclusive access to all resources without the possibility of interruption.
    if (is_ready == true) {
        /* Do something in response to the global shared flag */
        is_ready = false;
    }
    
  3. Exit the critical section to re-enable global interrupts.
    system_interrupt_leave_critical_section();