9.7. Synchronization constructs
Synchronization refers to the time order in which threads access shared or global variables. Because several parallel threads may need to access or update the same shared variable at about the same time, explicit control of synchronization is often required. A program with faulty synchronization may compile and run without incident, but will produce incorrect results.
OpenMP provides a variety of synchronization constructs, explained in the following sections, that control how the execution of each thread proceeds relative to other team threads:
Section 9.7.1, “master construct” on page 349
Section 9.7.2, “critical construct” on page 349
Section 9.7.3, “barrier directive” on page 350
Section 9.7.4, “atomic construct” ...
Get Developing and Porting C and C++ Applications on AIX now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.