[rtems commit] smptests/smpload01: Reduce timeout value
Sebastian Huber
sebh at rtems.org
Wed Apr 16 12:26:20 UTC 2014
Module: rtems
Branch: master
Commit: b3613c3a37139b2f3aea6a89f83d3acec3c520c8
Changeset: http://git.rtems.org/rtems/commit/?id=b3613c3a37139b2f3aea6a89f83d3acec3c520c8
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Apr 16 12:34:07 2014 +0200
smptests/smpload01: Reduce timeout value
Use events instead of suspend/resume.
---
testsuites/smptests/smpload01/init.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/testsuites/smptests/smpload01/init.c b/testsuites/smptests/smpload01/init.c
index e85d89e..a817d92 100644
--- a/testsuites/smptests/smpload01/init.c
+++ b/testsuites/smptests/smpload01/init.c
@@ -89,11 +89,7 @@ static void inherit_obtain_task(rtems_task_argument arg)
rtems_counter_delay_ticks(delay);
- /*
- * FIXME: Using a smaller value for the timeout triggers bug leading to
- * system corruption.
- */
- sc = rtems_semaphore_obtain(ctx->inherit_sem, RTEMS_WAIT, 100);
+ sc = rtems_semaphore_obtain(ctx->inherit_sem, RTEMS_WAIT, 1);
rtems_test_assert(sc == RTEMS_TIMEOUT);
_SMP_barrier_Wait(&ctx->inherit_barrier, &barrier_state, cpu_count);
@@ -106,7 +102,7 @@ static void inherit_obtain_task(rtems_task_argument arg)
sc = rtems_task_set_priority(ctx->inherit_release_task_id, prio, &prio);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
- sc = rtems_task_resume(ctx->inherit_release_task_id);
+ sc = rtems_event_transient_send(ctx->inherit_release_task_id);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_event_transient_receive(RTEMS_WAIT, RTEMS_NO_TIMEOUT);
@@ -133,7 +129,7 @@ static void inherit_release_task(rtems_task_argument arg)
while (true) {
rtems_task_priority prio = INHERIT_RELEASE_PRIO_LOW;
- sc = rtems_task_suspend(RTEMS_SELF);
+ sc = rtems_event_transient_receive(RTEMS_WAIT, RTEMS_NO_TIMEOUT);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_semaphore_release(ctx->inherit_sem);
More information about the vc
mailing list