diff options
Diffstat (limited to 'testsuites/smptests')
-rw-r--r-- | testsuites/smptests/smplock01/init.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/testsuites/smptests/smplock01/init.c b/testsuites/smptests/smplock01/init.c index d67d7bc07e..7c536c304c 100644 --- a/testsuites/smptests/smplock01/init.c +++ b/testsuites/smptests/smplock01/init.c @@ -138,15 +138,19 @@ static void test_2_body( ) { unsigned long counter = 0; - SMP_lock_Control lock = SMP_LOCK_INITIALIZER; + SMP_lock_Control lock; SMP_lock_Context lock_context; + _SMP_lock_Initialize(&lock); + while (assert_state(ctx, START_TEST)) { _SMP_lock_Acquire(&lock, &lock_context); _SMP_lock_Release(&lock, &lock_context); ++counter; } + _SMP_lock_Destroy(&lock); + ctx->test_counter[test][cpu_self] = counter; } @@ -159,9 +163,11 @@ static void test_3_body( ) { unsigned long counter = 0; - SMP_lock_Control lock = SMP_LOCK_INITIALIZER; + SMP_lock_Control lock; SMP_lock_Context lock_context; + _SMP_lock_Initialize(&lock); + while (assert_state(ctx, START_TEST)) { _SMP_lock_Acquire(&lock, &lock_context); @@ -172,6 +178,8 @@ static void test_3_body( ++counter; } + _SMP_lock_Destroy(&lock); + ctx->test_counter[test][cpu_self] = counter; } |