RTSync Tutorial 7 - Global Synchronizers
Global Synchronizers are very similar to regular synchronizers, except that they are not designed to be used for point-to-point synchronization as regular synchronizers are, but for a general synchronization. They are used for synchronizing methods inside an actor, or for general scheduling tasks (ie. starting this method at a certain time, starting another method at another time, etc.)
The structure of a global synchronizer is exactly the same as a normal synchronizer, but with one difference: global synchronizers do not have a name. This means that there can only be one global synchronizer per node (one global synchronizer per instance of a program running on a computer). The syntax is as follows:
global
{
variable declarations
init( actor pairs to synchronize )
{
initialization code
}
constraints
{
timing constraints
}
triggers
{
synchronization actions
}
exception
{
what to do on a timing violation
}
}
This is exactly the same as a synchronizer declaration, except for the first line it is simply the global keyword instead of the synchronizer keyword followed by a name.


