Synchronization of Primitive Activities
This section discusses how primitive activities are integrated into the generated code.
User-written procedures are called when the system starts the corresponding activity (for example,
st!(<activity>))
. In general, the user code and the generated code share the CPU time. That is, when the user code is executed, the statechart’s code (or other user activities) are suspended. Therefore, the Code Generator provides two types of user activities: simple procedures and tasks.