|Ada 95 Quality and Style Guide||Chapter 7|
7.4.7 Unprotected Shared Variables and Pragmas Atomic and Volatile
Do not use unprotected shared variables.
Consider using protected types to provide data synchronization.
Have tasks communicate through the rendezvous mechanism.
Do not use unprotected shared variables as a task synchronization device.
Consider using protected objects to encapsulate shared data.
Use pragma Atomic or Volatile only when you are forced to by run-time system deficiencies.
See Guidelines 6.1.1 and 6.1.2.
The rationale for this appears in Guidelines 6.1.1 and 6.2.4. In addition, the treatment of unprotected shared variables varies from implementation to implementation, thereby hindering portability.
|< Previous Page||Search||Contents||Index||Next Page >|