summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-10 11:14:35 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-12 16:11:24 +0200
commitc7bc6d44cbd563c72afb7e9355c7350c16acb27b (patch)
tree78e4fc2849538285582b58e84ca03c0c0fc21433 /testsuites
parentscore: Always provide <rtems/score/smplock.h> (diff)
downloadrtems-c7bc6d44cbd563c72afb7e9355c7350c16acb27b.tar.bz2
rtems: Add interrupt locks
Interrupt locks are low-level lock to protect critical sections accessed by threads and interrupt service routines.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/sp37/init.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuites/sptests/sp37/init.c b/testsuites/sptests/sp37/init.c
index 870316acfb..956c91d936 100644
--- a/testsuites/sptests/sp37/init.c
+++ b/testsuites/sptests/sp37/init.c
@@ -43,6 +43,21 @@ rtems_timer_service_routine test_isr_in_progress(
);
/* test bodies */
+
+static void test_interrupt_locks( void )
+{
+ rtems_interrupt_lock lock = RTEMS_INTERRUPT_LOCK_INITIALIZER;
+ rtems_interrupt_level level;
+
+ rtems_interrupt_lock_initialize( &lock );
+
+ rtems_interrupt_lock_acquire( &lock, level );
+ rtems_interrupt_lock_release( &lock, level );
+
+ rtems_interrupt_lock_acquire_isr( &lock );
+ rtems_interrupt_lock_release_isr( &lock );
+}
+
void test_interrupt_inline(void)
{
rtems_interrupt_level level;
@@ -318,6 +333,8 @@ rtems_task Init(
check_isr_worked( "body", isr_in_progress_body );
+ test_interrupt_locks();
+
puts( "*** END OF TEST 37 ***" );
rtems_test_exit( 0 );
}