summaryrefslogtreecommitdiffstats
path: root/testsuites/tmtests/tm26/task1.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-27 16:36:04 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-02 07:46:15 +0200
commitf009ed086d3da813a2c92b9834c3b2d618894883 (patch)
tree628365f80495067065583ec8fa3a278fe52c4f68 /testsuites/tmtests/tm26/task1.c
parentposix: Simplify message queues (diff)
downloadrtems-f009ed086d3da813a2c92b9834c3b2d618894883.tar.bz2
rtems: Avoid Giant lock for semaphores
Update #2555.
Diffstat (limited to 'testsuites/tmtests/tm26/task1.c')
-rw-r--r--testsuites/tmtests/tm26/task1.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
index 5b19c3d3b6..a46f042ac6 100644
--- a/testsuites/tmtests/tm26/task1.c
+++ b/testsuites/tmtests/tm26/task1.c
@@ -575,8 +575,16 @@ void complete_test( void )
thread_get_time = benchmark_timer_read();
benchmark_timer_initialize();
- for ( index=1 ; index <= OPERATION_COUNT ; index++ )
- (void) _Semaphore_Get( Semaphore_id, &location );
+ for ( index=1 ; index <= OPERATION_COUNT ; index++ ) {
+ ISR_lock_Context lock_context;
+
+ (void) _Semaphore_Get_interrupt_disable(
+ Semaphore_id,
+ &location,
+ &lock_context
+ );
+ _ISR_lock_ISR_enable( &lock_context );
+ }
semaphore_get_time = benchmark_timer_read();
benchmark_timer_initialize();
@@ -592,7 +600,7 @@ void complete_test( void )
set_thread_heir( _Thread_Get_executing() );
set_thread_dispatch_necessary( false );
- for (index = 0; index < 2 * OPERATION_COUNT; ++index) {
+ for (index = 0; index < OPERATION_COUNT; ++index) {
_Thread_Unnest_dispatch();
}