summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-26 10:26:49 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-03-04 07:46:16 +0100
commit0324410836a62e2c8e5b29aef49f34e0880c1104 (patch)
tree3d38e05632bb7ce2b456b361fb14aef2bc5da202 /testsuites/smptests
parentxdr_float.c: Fix typo (diff)
downloadrtems-0324410836a62e2c8e5b29aef49f34e0880c1104.tar.bz2
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.
Diffstat (limited to 'testsuites/smptests')
-rw-r--r--testsuites/smptests/smpcache01/init.c8
-rw-r--r--testsuites/smptests/smpfatal03/init.c4
2 files changed, 6 insertions, 6 deletions
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)