CPC G06F 9/52 (2013.01) [G06F 9/542 (2013.01)] | 20 Claims |
1. A computer implemented method for synchronizing on a notification event, the method comprising:
responsive to a determination, by a first thread attempting to start an operation, that a second thread has started the operation, obtaining a value of a stamp included in a synchronization object related to the operation, wherein obtaining the value of the stamp includes:
acquiring a spinlock of the synchronization object,
reading the value of the stamp from the synchronization object, and
releasing the spinlock of the synchronization object;
determining, by the first thread, a current value of the stamp by:
reacquiring the spinlock of the synchronization object,
rereading the value of the stamp from the synchronization object, and
rereleasing the spinlock of the synchronization object;
determining, by the first thread, whether the value of the stamp obtained is the same as the current value of the stamp; and
responsive to a determination, by the first thread, that the obtained value of the stamp is not the same as the current value of the stamp, continuing execution of the first thread.
|