diff options
| author | Tm-C-mT <[email protected]> | 2025-12-03 19:33:24 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2025-12-04 11:17:50 +0800 |
| commit | dd19c0eb7205b00a8f5c9a179d95d345b5a0f6d4 (patch) | |
| tree | 0f1a9c93808ce86ce456e28b9116e9fc57091b39 /src/utest | |
| parent | 7836d26d398433737c53174da1ff5d18985964c3 (diff) | |
[utest]: Solve the address misalignment issue of atomic operations
In smp_assigned_idle_cores_tc, the finish_flag involves atomic operations
and thus requires address alignment.
Signed-off-by: Mengchen Teng <[email protected]>
Diffstat (limited to 'src/utest')
| -rw-r--r-- | src/utest/smp/smp_assigned_idle_cores_tc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utest/smp/smp_assigned_idle_cores_tc.c b/src/utest/smp/smp_assigned_idle_cores_tc.c index 74e31760f3..94092959f9 100644 --- a/src/utest/smp/smp_assigned_idle_cores_tc.c +++ b/src/utest/smp/smp_assigned_idle_cores_tc.c @@ -49,7 +49,8 @@ #define THREAD_STACK_SIZE UTEST_THR_STACK_SIZE #define THREAD_PRIORITY 20 static rt_thread_t threads[RT_CPUS_NR - 1]; -static int tick = 0, finish_flag = 0; +static int tick = 0; +static rt_align(sizeof(rt_ubase_t)) int finish_flag = 0; static int num = 0; /* thread entry function */ static void thread_entry(void *parameter) |
