This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libgomp: gomp_ptrlock*() specification


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]