diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-06-02 14:10:05 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-06-03 09:19:34 +0200 |
commit | f48b73deb6c7958478b6fbaeb9a27483c6eb00b3 (patch) | |
tree | abe7cd9f45e155979c022476b9e5674a79cc5512 /testsuites/smptests/smpscheduler03/init.c | |
parent | score: Remove assert (diff) | |
download | rtems-f48b73deb6c7958478b6fbaeb9a27483c6eb00b3.tar.bz2 |
smptests/smpscheduler03: Use proper lock
Diffstat (limited to '')
-rw-r--r-- | testsuites/smptests/smpscheduler03/init.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/testsuites/smptests/smpscheduler03/init.c b/testsuites/smptests/smpscheduler03/init.c index 3a068a24b7..4a3aa54ca5 100644 --- a/testsuites/smptests/smpscheduler03/init.c +++ b/testsuites/smptests/smpscheduler03/init.c @@ -195,9 +195,9 @@ static Thread_Control *change_priority_op( { const Scheduler_Control *scheduler = _Scheduler_Get(thread); Thread_Control *needs_help; - ISR_Level level; + ISR_lock_Context lock_context; - _ISR_Disable( level ); + _Scheduler_Acquire(thread, &lock_context); thread->current_priority = new_priority; needs_help = (*scheduler->Operations.change_priority)( scheduler, @@ -205,7 +205,7 @@ static Thread_Control *change_priority_op( new_priority, prepend_it ); - _ISR_Enable( level ); + _Scheduler_Release(thread, &lock_context); return needs_help; } @@ -430,22 +430,22 @@ static void test_yield_op(void) static void block_op(Thread_Control *thread) { const Scheduler_Control *scheduler = _Scheduler_Get(thread); - ISR_Level level; + ISR_lock_Context lock_context; - _ISR_Disable( level ); + _Scheduler_Acquire(thread, &lock_context); (*scheduler->Operations.block)(scheduler, thread); - _ISR_Enable( level ); + _Scheduler_Release(thread, &lock_context); } static Thread_Control *unblock_op(Thread_Control *thread) { const Scheduler_Control *scheduler = _Scheduler_Get(thread); Thread_Control *needs_help; - ISR_Level level; + ISR_lock_Context lock_context; - _ISR_Disable( level ); + _Scheduler_Acquire(thread, &lock_context); needs_help = (*scheduler->Operations.unblock)(scheduler, thread); - _ISR_Enable( level ); + _Scheduler_Release(thread, &lock_context); return needs_help; } |