cmsis: align buffer containing struct k_timer

The slab cmis_timer_slab is used to allocate objects of the type
"struct timer_obj", so it should be defined to use the compile-time
alignment requirement of "struct timer_obj", rather than 4.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
This commit is contained in:
Martin Åberg 2020-10-27 18:54:42 +01:00 committed by Andrew Boie
commit 73b7dde833

View file

@ -22,7 +22,7 @@ struct timer_obj {
};
K_MEM_SLAB_DEFINE(cmsis_timer_slab, sizeof(struct timer_obj),
CONFIG_CMSIS_TIMER_MAX_COUNT, 4);
CONFIG_CMSIS_TIMER_MAX_COUNT, __alignof__(struct timer_obj));
static void zephyr_timer_wrapper(struct k_timer *timer)
{