Completed additions to atomic API. Added exchange operation in relaxed memory model. Added CAS operations in rel and acq_rel memory order. Added 64 bit versions of all non-relaxed operations defined so far. Added all missing validation tests. Replaced internal atomics usage in lock, etc code (all except spinlock and timer) with API calls.
This set of atomic calls seem to be sufficient to current linux-generic use cases. Timer and spinlock use atomic flag and 128 bit types, but does not require additional operation types (e.g. load_acq, store_rel, cas, cas_rel, etc are supported by the API). Additional operations can be added later if needed. Only commonly needed combinations of non-relaxed operations will be supported (added based on use case as any other ODP API). This set should already enable major part of lock-free algorithms. v2: * rebased on latest api-next Petri Savolainen (13): api: atomic: rename release ordering api: atomic: added 32bit cas_rel and cas_acq_rel linux-generic: atomic: 32bit cas_rel and cas_acq_rel api: atomic: add non-relaxed 64bit operations linux-generic: atomic: non-relaxed 64bit operations api: atomic: added relaxed exchange operation linux-generic: atomic: implemented exchange validation: atomic: added max and min tests validation: atomic: added cas test validation: atomic: added xchg test validation: atomic: added non-relaxed test linux-generic: locks: replace internal atomics linux-generic: barrier: use API memory barrier include/odp/api/atomic.h | 220 ++++++++++++-- platform/linux-generic/include/odp/atomic.h | 142 ++++++++- .../linux-generic/include/odp_atomic_internal.h | 6 - platform/linux-generic/include/odp_pool_internal.h | 1 - platform/linux-generic/odp_barrier.c | 8 +- platform/linux-generic/odp_pool.c | 1 - platform/linux-generic/odp_rwlock.c | 23 +- platform/linux-generic/odp_ticketlock.c | 21 +- test/validation/synchronizers/synchronizers.c | 330 ++++++++++++++++++++- test/validation/synchronizers/synchronizers.h | 4 + 10 files changed, 672 insertions(+), 84 deletions(-) -- 2.6.3 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp