#pragma ibm critical (C only)

Purpose

Note: #pragma ibm critical has been deprecated and might be removed from the future release. Use #pragma omp critical. For more information about deprecated SMP directives, see Deprecated directives.

The critical pragma identifies a critical section of program code that must only be run by one process at a time.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-#--pragma--ibm critical--+--------+-------------------------><
                            '-(name)-'   

where name can be used to optionally identify the critical region. Identifiers naming a critical region have external linkage.

Usage

The compiler reports an error if you try to branch into or out of a critical section. Some situations that will cause an error are: