Patent ID: 8056087

Claim:
A method to facilitate synchronizing threads belonging to multiple barrier synchronization groups in a data processing system, said threads comprising a single parent thread and at least one child thread, the single parent thread and the at least one child thread being members of a particular barrier synchronization group, said method comprising: upon reaching a point of barrier synchronization for a current barrier synchronization of the particular barrier synchronization group by said at least one child thread, storing, within a portion of memory allocated to synchronization, a group identifier for said at least one child thread, the group identifier uniquely identifying the particular barrier synchronization group, wherein the point of barrier synchronization is a point to be reached by all members of the particular barrier synchronization group during the current barrier synchronization of the particular barrier synchronization group, wherein the storing indicates that the point of barrier synchronization has been reached by the at least one child thread for the particular barrier synchronization group, and toggling a portion of said allocated memory representing a sequence number, the sequence number distinguishing between the current barrier synchronization of the particular barrier synchronization group and a previous barrier synchronization of the members of the particular barrier synchronization group, wherein one child thread of, the at least one child thread is a member of multiple barrier synchronization groups and the one child thread stores, within the portion of memory allocated to synchronization, the group identifier uniquely identifying the particular barrier synchronization group for which the one child thread has reached the point of barrier synchronization to distinguish that barrier synchronization of the particular barrier synchronization group from one or more barrier synchronizations of one or more other barrier synchronization groups of the multiple barrier synchronization groups of which the one child thread is a member; upon reaching the point of barrier synchronization by said single parent thread, polling said portion of allocated memory to determine that each child thread of the at least one child thread has reached said point of synchronization; and storing within said allocated memory an indicator indicating release of any said child thread.