summaryrefslogtreecommitdiffstats
path: root/testsuites/tmtests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-10 08:25:32 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-11 10:58:09 +0100
commitd50acdbb6c8213114ce887a56daea02697c9e1a1 (patch)
treee48fb252786992308fa2dd6337c8a02db35bd10b /testsuites/tmtests
parentsapi: Use one SMP lock for all chains (diff)
downloadrtems-d50acdbb6c8213114ce887a56daea02697c9e1a1.tar.bz2
score: Add local context to SMP lock API
Add a local context structure to the SMP lock API for acquire and release pairs. This context can be used to store the ISR level and profiling information. It may be later used to enable more sophisticated lock algorithms, e.g. MCS locks. There is only one lock that cannot be used with a local context. This is the per-CPU lock since here we would have to transfer the local context through a context switch which is very complicated.
Diffstat (limited to 'testsuites/tmtests')
-rw-r--r--testsuites/tmtests/tmcontext01/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuites/tmtests/tmcontext01/init.c b/testsuites/tmtests/tmcontext01/init.c
index ba3bcec02d..130952b4e8 100644
--- a/testsuites/tmtests/tmcontext01/init.c
+++ b/testsuites/tmtests/tmcontext01/init.c
@@ -129,8 +129,8 @@ static void sort_t(void)
static void test_by_function_level(int fl, bool dirty)
{
- rtems_interrupt_level level;
rtems_interrupt_lock lock = RTEMS_INTERRUPT_LOCK_INITIALIZER;
+ rtems_interrupt_lock_context lock_context;
int s;
uint64_t min;
uint64_t q1;
@@ -138,13 +138,13 @@ static void test_by_function_level(int fl, bool dirty)
uint64_t q3;
uint64_t max;
- rtems_interrupt_lock_acquire(&lock, level);
+ rtems_interrupt_lock_acquire(&lock, &lock_context);
for (s = 0; s < SAMPLES; ++s) {
call_at_level(fl, fl, s, dirty);
}
- rtems_interrupt_lock_release(&lock, level);
+ rtems_interrupt_lock_release(&lock, &lock_context);
sort_t();