diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2021-01-12 09:18:13 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2021-01-12 09:18:13 +0300 |
commit | ddd04c4d79317f1d2aa8917d6e5f4d17b237bdea (patch) | |
tree | 1e852863b49f08a111e5b4c3fab6d8e1e0ccb388 /src | |
parent | 751c3e6c418828fe9e613372df5908f32020a31e (diff) | |
download | libatomic_ops-ddd04c4d79317f1d2aa8917d6e5f4d17b237bdea.tar.gz |
Workaround assertion violation in AO_load/store on m68k
Issue #48 (libatomic_ops).
* src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h
(AO_ACCESS_CHECK_ALIGNED): Do not define if __m68k__; add comment.
Diffstat (limited to 'src')
-rw-r--r-- | src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h b/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h index 6d81279..97f31e1 100644 --- a/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h +++ b/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h @@ -24,7 +24,14 @@ /* short, and unsigned int loads and stores are atomic but only if data */ /* is suitably aligned. */ -#define AO_ACCESS_CHECK_ALIGNED +#if defined(__m68k__) + /* Even though AO_t is redefined in m68k.h, some clients use AO */ + /* pointer size primitives to access variables not declared as AO_t. */ + /* Such variables may have 2-byte alignment, while their sizeof is 4. */ +#else +# define AO_ACCESS_CHECK_ALIGNED +#endif + /* Check for char type is a misnomer. */ #define AO_ACCESS_short_CHECK_ALIGNED #define AO_ACCESS_int_CHECK_ALIGNED |