On Wed, Jul 08, 2015 at 09:36:43PM +0200, Sebastian Huber wrote: > from the use cases in libgomp it seems that you may set the value of a > ptrlock object at most once via gomp_ptrlock_set() if it wasn't already > initialized to a non-NULL value via gomp_ptrlock_init()? Is this correct?
Please see https://gcc.gnu.org/ml/gcc-patches/2008-03/msg01278.html for details. > Why is there a specialized Linux implementation? Is this to save one extra > integer for the mutex? Not just that, it is simply significantly more efficient, which is very important for such a frequently used synchronization primitive. You are free to define it for some other target also efficiently. Jakub