summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadsetstate.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-11 11:54:49 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-12 13:24:41 +0200
commitbd12dda405e1bab16c522f7ef0dd2b455230d269 (patch)
treec644df77b8512e1e211bfae39587511d0774f0d8 /cpukit/score/src/threadsetstate.c
parentrtems: Avoid Giant lock rtems_task_is_suspended() (diff)
downloadrtems-bd12dda405e1bab16c522f7ef0dd2b455230d269.tar.bz2
score: Use thread state lock for current state
In addition protect scheduler of thread by thread state lock. Enables use of scheduler per-instance locks. Update #2555.
Diffstat (limited to 'cpukit/score/src/threadsetstate.c')
-rw-r--r--cpukit/score/src/threadsetstate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/score/src/threadsetstate.c b/cpukit/score/src/threadsetstate.c
index 51128279b1..3aaa463f97 100644
--- a/cpukit/score/src/threadsetstate.c
+++ b/cpukit/score/src/threadsetstate.c
@@ -36,7 +36,7 @@ States_Control _Thread_Set_state(
_Assert( state != 0 );
- _Scheduler_Acquire( the_thread, &lock_context );
+ _Thread_State_acquire( the_thread, &lock_context );
previous_state = the_thread->current_state;
next_state = _States_Set( state, previous_state);
@@ -46,7 +46,7 @@ States_Control _Thread_Set_state(
_Scheduler_Block( the_thread );
}
- _Scheduler_Release( the_thread, &lock_context );
+ _Thread_State_release( the_thread, &lock_context );
return previous_state;
}