From 0324410836a62e2c8e5b29aef49f34e0880c1104 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 26 Feb 2015 10:26:49 +0100 Subject: smptests: Do not use Giant directly This ensures that thread dispatching is disabled. A Giant acquire/release pair must take place in the same processor. --- testsuites/smptests/smpcache01/init.c | 8 ++++---- testsuites/smptests/smpfatal03/init.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'testsuites/smptests') diff --git a/testsuites/smptests/smpcache01/init.c b/testsuites/smptests/smpcache01/init.c index 39808b3fd9..01d6e1ea7f 100644 --- a/testsuites/smptests/smpcache01/init.c +++ b/testsuites/smptests/smpcache01/init.c @@ -95,14 +95,14 @@ static void standard_funcs_giant_taken_test( size_t set_size, cpu_set_t *cpu_set, SMP_barrier_State *bs ) { if ( rtems_get_current_processor() == 0) - _Giant_Acquire(); + _Thread_Disable_dispatch(); _SMP_barrier_Wait( &ctx.barrier, bs, rtems_get_processor_count() ); cache_manager_smp_functions( set_size, cpu_set ); if ( rtems_get_current_processor() == 0) - _Giant_Release(); + _Thread_Enable_dispatch(); } static void test_func_test( size_t set_size, cpu_set_t *cpu_set, @@ -145,7 +145,7 @@ static void test_func_giant_taken_test( size_t set_size, cpu_set_t *cpu_set, ctx.count[rtems_get_current_processor()] = 0; if ( rtems_get_current_processor() == 0) - _Giant_Acquire(); + _Thread_Disable_dispatch(); _SMP_barrier_Wait( &ctx.barrier, bs, rtems_get_processor_count() ); @@ -157,7 +157,7 @@ static void test_func_giant_taken_test( size_t set_size, cpu_set_t *cpu_set, rtems_get_processor_count() ); if ( rtems_get_current_processor() == 0) - _Giant_Release(); + _Thread_Enable_dispatch(); } static void cmlog( const char* str ) diff --git a/testsuites/smptests/smpfatal03/init.c b/testsuites/smptests/smpfatal03/init.c index 6d7a7ec3f6..788b07167c 100644 --- a/testsuites/smptests/smpfatal03/init.c +++ b/testsuites/smptests/smpfatal03/init.c @@ -42,7 +42,7 @@ static void acquire_giant_and_fatal_task(rtems_task_argument arg) int i; for (i = 0; i < 13; ++i) { - _Giant_Acquire(); + _Thread_Disable_dispatch(); } _SMP_barrier_Wait(&giant_barrier, &state, CPU_COUNT); @@ -62,7 +62,7 @@ static void wait_for_giant(void) _SMP_barrier_Wait(&giant_barrier, &state, CPU_COUNT); - _Giant_Acquire(); + _Thread_Disable_dispatch(); } static void Init(rtems_task_argument arg) -- cgit v1.2.3