© Thomas Kunz 2000
SCE 574
204
   An Example
äProcess P1 and P2 are running this same procedure and have access to the same variable “a” äProcesses can be interrupted anywhere äIf P1 is first interrupted after user input and P2 executes entirely äThen the character echoed by P1 will be the one read by P2 !!
static char a;
void echo()
{
   cin >> a;
   cout << a;
}