Next: , Previous: , Up: Component Declarative Statements   [Contents][Index]


10.5.4.2 blocking

The blocking keyword is a declarative statement that can be used in a component.

blocking ::= "blocking" statement

Using blocking requires an explicit reply. It can only be used in a component. If the reply is omitted for the blocking trigger, the imperative statement of another trigger must perform the reply for the blocked port. Thus, time and value of a blocked port reply depend on another trigger. blocking may be used once in the declarative prefix.

Only provides ports are affected by blocking. A call of a provides port in-event will not return before a reply is performed for that port.

Guards or on is commutative with respect to blocking. If blocking appears before a guard or on it applies to the imperative statement after the guard or on.

For example:

on trigger (): blocking imperative-statement;         (1)
blocking on trigger (): imperative-statement;         (2)
on trigger (): blocking [guard] imperative-statement; (3)
on trigger ():
{
  blocking [guard] imperative-statement1;             (4)
  [guard] imperative-statement2;
}

Explanation:

2) The blocking keyword applies to the imperative-statement following on trigger:. This form is semantically equivalent to 1).

3) The blocking keyword applies to the imperative-statement following [guard]. This form is semantically equivalent to on trigger (): [guard] blocking imperative-statement;"

4) The blocking keyword applies to imperative-statement1. It does not apply to imperative-statement2.


Next: Formal Binding, Previous: Component on, Up: Component Declarative Statements   [Contents][Index]