> > > The first is built only for ARM and the second for the rest. Would there
> > >be a way to build both always ?
> > For ARMv7a and ARMv8a, you could build both versions. You really want to
> > use the LL/SC version on these architectures.
> > 
> > For architectures without double-word LL/SC, only the lock-based version
> > can be built.
> 
> 
> You could *compile* the lock version always. It's based on locks, not on arch 
> specific instructions.

That would require an abstraction layer consisting of function pointers
pointing to one of the two implementations. On architectures without support
for LLD/SCD, there would only be one implementation.

This could make sense if... you were benchmarking *many* different concurrent
queue implementations and wanted to keep the benchmark code extremely succinct
and were willing to pay for function pointers. But that is not the case here.

This code is deliberately written to be static inline and conditionally 
compiled.

> -Petri
> 

Reply via email to