diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-03-20 13:41:27 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-03-24 14:35:05 +0100 |
commit | 4054c9164601830c7ead74be612d33c4717d8ea6 (patch) | |
tree | 10b417daff4d9013a3fda4ee6f42895129259984 /cpukit/score/src/threadsetstate.c | |
parent | score: Use a dedicated ISR lock for thread queues (diff) | |
download | rtems-4054c9164601830c7ead74be612d33c4717d8ea6.tar.bz2 |
score: Add scheduler acquire/release
This is currently a global lock for all scheduler instances. It should
get replaced with one lock per scheduler instance in the future.
Update #2273.
Diffstat (limited to 'cpukit/score/src/threadsetstate.c')
-rw-r--r-- | cpukit/score/src/threadsetstate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpukit/score/src/threadsetstate.c b/cpukit/score/src/threadsetstate.c index a8cd38efc7..02ee70ed9b 100644 --- a/cpukit/score/src/threadsetstate.c +++ b/cpukit/score/src/threadsetstate.c @@ -30,10 +30,10 @@ void _Thread_Set_state( States_Control state ) { - ISR_Level level; - States_Control current_state; + ISR_lock_Context lock_context; + States_Control current_state; - _ISR_Disable( level ); + _Scheduler_Acquire( the_thread, &lock_context ); current_state = the_thread->current_state; if ( _States_Is_ready( current_state ) ) { @@ -44,5 +44,5 @@ void _Thread_Set_state( the_thread->current_state = _States_Set( state, current_state); } - _ISR_Enable( level ); + _Scheduler_Release( the_thread, &lock_context ); } |