concurrencykit / ck

Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance concurrent systems developed in C99+.
http://concurrencykit.org/
Other
2.38k stars 313 forks source link

configure for a 'gcc builtins' (non-native) port? #51

Closed mhaberler closed 7 years ago

mhaberler commented 9 years ago

http://concurrencykit.org/community.html 8) says:

If you don't want a native port, Concurrency Kit will drop-back to using GCC atomic intrinsics.

how do I achieve that?

It might be useful for us - as a baseline package which works everywhere, maybe just not with stellar performance

sbahra commented 9 years ago

That page is old, I should probably remove it. Right now there is no automatic "GCC" platform. We can add support for configure to do this, let's create a feature issue to track it, happy to discuss specifics there.

Basically, if no first-class platform is detected, we can just fallback and use a build.gcc. The work involved is minimal.

cognet commented 9 years ago

I added a configure option to force the use of the gcc bulitins, even if the platform is known and supported

sbahra commented 9 years ago

Do we fall back to this option if it is detected that the current platform is unsupported?

mhaberler commented 9 years ago

with a notice - ok not sure if "supported" will be a configure-only property, it might need a compile test due to compiler defaults diverging from arch/uname -m output

cognet commented 9 years ago

Right now configure will stop if it doesn't recognize the machine, it can easily be changed, though we should probably require a few informations from the user then, ie the memory model (or shall we default to RMO ?)

cognet commented 9 years ago

There's a few thing we'd have to deal with, too, as showed by the mips thing, such as the generic code assuming it can emit a 64bits CAS when it may not.

sbahra commented 9 years ago

We should default to RMO.

sbahra commented 7 years ago

@cognet Should this ticket be closed out?

cognet commented 7 years ago

Yup it should be fine