summaryrefslogtreecommitdiffstats
path: root/cpukit/libtest
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-26 07:28:38 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-12-07 12:53:39 +0100
commit5e3607bc7d4daeea8de009d98e072f8be61922aa (patch)
tree3da101437a02b4598dba59a44f9e804345285bf4 /cpukit/libtest
parentscore: Fix atomic stores for C++ (diff)
downloadrtems-5e3607bc7d4daeea8de009d98e072f8be61922aa.tar.bz2
libtest: Fix overlap in measurement context
Diffstat (limited to 'cpukit/libtest')
-rw-r--r--cpukit/libtest/t-test-rtems-measure.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/libtest/t-test-rtems-measure.c b/cpukit/libtest/t-test-rtems-measure.c
index b75aff0d1a..da4dea50e8 100644
--- a/cpukit/libtest/t-test-rtems-measure.c
+++ b/cpukit/libtest/t-test-rtems-measure.c
@@ -241,14 +241,14 @@ T_measure_runtime_create(const T_measure_runtime_config *config)
ctx->sample_count = config->sample_count;
ctx->samples = add_offset(ctx, sizeof(*ctx));
+ ctx->samples = align_up(ctx->samples, cache_line_size);
ctx->cache_line_size = cache_line_size;
ctx->chunk_size = chunk_size;
ctx->chunk = add_offset(ctx->samples, sample_size);
+ ctx->chunk = align_up(ctx->chunk, cache_line_size);
ctx->runner = rtems_task_self();
ctx->load_count = load_count;
ctx->load_contexts = add_offset(ctx->chunk, chunk_size);
- ctx->samples = align_up(ctx->samples, cache_line_size);
- ctx->chunk = align_up(ctx->chunk, cache_line_size);
for (i = 0; i < load_count; ++i) {
rtems_id id;