Oracle® Solaris Studio 12.4: OpenMP API User's Guide

Exit Print View

Updated: December 2014
 
 

4.7.1 Threadprivate and Thread-Specific Information

When a thread encounters a task scheduling point, the implementation might suspend the current task and schedule the thread to work on another task. This behavior implies that threadprivate variables or other thread-specific information such as the thread number in a task might change across a task scheduling point.

If the suspended task is tied, then the thread that resumes executing the task will be the same thread that suspended it. Therefore, the thread number will remain the same after the task is resumed. However, the value of a threadprivate variable might change because the thread might have been scheduled to work on another task that modified the threadprivate variable before resuming the suspended task.

If the suspended task is untied, then the thread that resumes executing the task might be different from the thread that suspended it. Therefore, both the thread number and the value of threadprivate variables before and after the task scheduling point might be different.