Parallelism-IncorrectCriticalRegion¶
Critical regions must obey certain layout rules
Required inputs: IR
Possible Messages
This rule has no predefined messages.
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
check_all_statement_sequences¶
check_all_statement_sequences : bool = False
enter_critical_functions¶
enter_critical_functions
Set of function names to enter a critical region.Type: set[bauhaus.analysis.config.QualifiedName]
Default:
{'EnterCriticalSection', 'mtx_lock', 'pthread_mutex_lock', 'std::_Mutex_base::lock', 'std::mutex::lock'}
enter_critical_macros¶
enter_critical_macros : set[bauhaus.analysis.config.MacroName] = set()
exit_critical_functions¶
exit_critical_functions
Set of function names to exit a critical region.Type: set[bauhaus.analysis.config.QualifiedName]
Default:
{'ExitCriticalSection', 'mtx_unlock', 'pthread_mutex_unlock', 'std::_Mutex_base::unlock', 'std::mutex::unlock'}
exit_critical_macros¶
exit_critical_macros : set[bauhaus.analysis.config.MacroName] = set()
nested_critical_regions¶
nested_critical_regions : bool = True
treat_enter_exit_functions_as_simple_names¶
treat_enter_exit_functions_as_simple_names : bool = False
critical::enter for
a C++ function enter() inside of a namespace critical.
Previously, these options accepted only simple names (enter) and
matched this to all functions with that simple name, potentially including a
separate C++ function critical2::enter(). If this project's config
relied on that effect, please update the configuration to include all qualified
names, or set this option to true to fall back to the old behavior.