Skip to main content

H.5 Pragma Detect_Blocking

danger

This Reference Manual output has not been verified, and may contain omissions or errors. Report any problems on the tracking issue

1/5

The following pragma requires an implementation to detect potentially blocking operations during the execution of a protected operation or a parallel construct.

Syntax

2/2

The form of a pragma Detect_Blocking is as follows:

3/2

pragma Detect_Blocking;

Post-Compilation Rules

4/2

A pragma Detect_Blocking is a configuration pragma.

Dynamic Semantics

5/5

An implementation is required to detect a potentially blocking operation that occurs during the execution of a protected operation or a parallel construct defined within a compilation unit to which the pragma applies, and to raise Program_Error (see 9.5).

Implementation Permissions

6/5

An implementation is allowed to reject a compilation_unit to which a pragma Detect_Blocking applies if a potentially blocking operation is present directly within an entry_body, the body of a protected subprogram, or a parallel construct occurring within the compilation unit.

7/5

NOTE An operation that causes a task to be blocked within a foreign language domain is not defined to be potentially blocking, and is unlikely to be detected.

Extensions to Ada 95

7.a/2

Pragma Detect_Blocking is new.

Extensions to Ada 2012

7.b/5

Pragma Detect_Blocking now applies to parallel constructs as well as protected actions.