Skip to content

Commit 5850636

Browse files
aescolarfabiobaltieri
authored andcommitted
tests: portability cmsis_rtosv2: Fix buffer aligment
The kernel requires the buffer to be word aligned. Instead of assuming the word size is 32bits, lets align the buffer to the size of a pointer, which should match the word size (and which is the check the kernel performs). Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent 175abfb commit 5850636

File tree

1 file changed

+1
-1
lines changed
  • tests/subsys/portability/cmsis_rtos_v2/src

1 file changed

+1
-1
lines changed

tests/subsys/portability/cmsis_rtos_v2/src/mempool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct mem_block {
1616
int member2;
1717
};
1818

19-
static char __aligned(4) sample_mem[sizeof(struct mem_block) * MAX_BLOCKS];
19+
static char __aligned(sizeof(void *)) sample_mem[sizeof(struct mem_block) * MAX_BLOCKS];
2020
static const osMemoryPoolAttr_t mp_attrs = {
2121
.name = "TestMempool",
2222
.attr_bits = 0,

0 commit comments

Comments
 (0)