Hello every one, I am currently working on porting the linux-generic implementation of DPDK on Kalray architecture and slightly pulling my hair out with all the atomics. By going through the code I noticed that there are a *lot* of functions for atomics that do almost the same thing but not exactly.
Fox example in include/odp/atomic.h, all the load/store/add/sub function are defined using GCC builtins, but almost the same functions (adding the memory model as a parameters) are also defined in odp_atomic_internal.h Wouldn't it make sense to reuse these internals functions in atomic.h so there is only one place where we rely on "external" atomic features? The reason behind this is that our GCC does not support all the atomic builtins yet and I'd rather factor some code than reimplement the same atomic functions all over the place :) Also, odp_atomic_internal.h defined the _odp_atomic_flag_t and the associated lock/release helpers. But the type is not used for odp_spin_lock, and neither the type nor the helpers are used for odp_atomic_u64_t when GCC does not support 64b atomic operations. Is there a reason for that? Regards -- Nicolas Morey Chaisemartin Phone : +33 6 42 46 68 87 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp