[rtems commit] sptests/spnsext01: Add SMP support
Sebastian Huber
sebh at rtems.org
Tue Aug 27 08:44:49 UTC 2013
Module: rtems
Branch: master
Commit: c955f99f6e08e3775429dc02ff422de759c8dc23
Changeset: http://git.rtems.org/rtems/commit/?id=c955f99f6e08e3775429dc02ff422de759c8dc23
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Aug 26 16:46:53 2013 +0200
sptests/spnsext01: Add SMP support
---
testsuites/sptests/spnsext01/init.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/testsuites/sptests/spnsext01/init.c b/testsuites/sptests/spnsext01/init.c
index 04bae8c..cbe3c13 100644
--- a/testsuites/sptests/spnsext01/init.c
+++ b/testsuites/sptests/spnsext01/init.c
@@ -21,6 +21,7 @@
static rtems_task Init(rtems_task_argument argument)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
+ rtems_interrupt_lock lock = RTEMS_INTERRUPT_LOCK_INITIALIZER;
rtems_interrupt_level level;
rtems_interval t0 = 0;
rtems_interval t1 = 0;
@@ -50,7 +51,7 @@ static rtems_task Init(rtems_task_argument argument)
n = (3 * n) / 2;
- rtems_interrupt_disable(level);
+ rtems_interrupt_lock_acquire(&lock, level);
sc = rtems_clock_get_uptime(&uptime);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
for (i = 0; i < n; ++i) {
@@ -62,7 +63,7 @@ static rtems_task Init(rtems_task_argument argument)
rtems_test_assert(!_Timespec_Less_than(&new_uptime, &uptime));
uptime = new_uptime;
}
- rtems_interrupt_enable(level);
+ rtems_interrupt_lock_release(&lock, level);
puts("*** END OF TEST NANO SECONDS EXTENSION 1 ***");
More information about the vc
mailing list