Tests: Add test for byte/short atomics on addresses which are not word-aligned
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 3 Sep 2023 14:55:24 +0000 (10:55 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 3 Sep 2023 14:57:48 +0000 (10:57 -0400)
commitcac31bf03005c1265ed11df29cf713f626f39c66
tree99f0b5a3756dcd3fd3de508f7e92d820a464a900
parentaad674a9a583e09e854145f18c5d8854269dce8c
Tests: Add test for byte/short atomics on addresses which are not word-aligned

Add a unit test to catch architectures which do not allow byte and short
atomic operations on addresses which are not word aligned.

If an architecture supports byte and short atomic operations, it should
be valid to issue those operations on variables which are not
word-aligned, otherwise the architecture should not define
UATOMIC_HAS_ATOMIC_BYTE nor UATOMIC_HAS_ATOMIC_SHORT.

This should help identify architectures which mistakenly define
UATOMIC_HAS_ATOMIC_BYTE and UATOMIC_HAS_ATOMIC_SHORT.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I13d2f3be41749b018b39499106938b3746c419c1
tests/unit/test_uatomic.c
This page took 0.026889 seconds and 4 git commands to generate.