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

Add atomic operation #155

Closed dangyajun closed 4 years ago

dangyajun commented 4 years ago

Missing the compitable or similiar atomic operation implementation of stdatomic.h or atomic.h

sbahra commented 4 years ago

Hi @dangyajun, I would like to better understand the ask here.

Concurrency Kit currently provides a lot more atomic operations than stdatomic. See http://concurrencykit.org/doc/ck_pr.html.

Was there something missing? Or are you asking for an interface that is compatible with stdatomic?

dangyajun commented 4 years ago

Yes, I think compatible interfaces with stdatomic.h is necessary for porting.

sbahra commented 4 years ago

Are you referring to having a stdatomic backend for ck_pr? There is a GCC built-in port already that uses __sync-primitives and ACCESS_ONCE semantics. This can be used on any target GCC supports. For example, try passing --use-cc-builtins to configure.

What platform are you targeting?