Previous: Single-Assignment Arguments and Return Values Up: Synchronization Next: Synchronizing Spawned Functions
The single-assignment nature of a sync variable cannot be cast away, neither implicitly nor explicitly. This guarantees that a single-assignment variable cannot be misused (that is, modified) in a thread of control. For example, consider the following examples:
{ void f (int *); sync int a; int b;b = a; //OK b = (int)a; //OK
(int)a = 3; //ERROR f((int *)&a); //ERROR }