diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-12 16:32:27 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-20 07:49:37 +0200 |
commit | 9949d8a7d042da7ba53516300db5c34c8b9c8a31 (patch) | |
tree | 614aded79bd69e1134dc1b83711b0636ca8e044d /cpukit/score/src/apimutexlock.c | |
parent | score: Delete unused variable (diff) | |
download | rtems-9949d8a7d042da7ba53516300db5c34c8b9c8a31.tar.bz2 |
score: Add Thread_Change_life()
Add _Thread_Change_life_locked() as a general function to alter the
thread life state. Use it to implement _Thread_Set_life_protection() as
a first step.
Update #2555.
Update #2626.
Diffstat (limited to 'cpukit/score/src/apimutexlock.c')
-rw-r--r-- | cpukit/score/src/apimutexlock.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cpukit/score/src/apimutexlock.c b/cpukit/score/src/apimutexlock.c index 2e36518c55..79729d4d24 100644 --- a/cpukit/score/src/apimutexlock.c +++ b/cpukit/score/src/apimutexlock.c @@ -25,10 +25,11 @@ void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { - bool previous_thread_life_protection; - ISR_lock_Context lock_context; + Thread_Life_state previous_thread_life_state; + ISR_lock_Context lock_context; - previous_thread_life_protection = _Thread_Set_life_protection( true ); + previous_thread_life_state = + _Thread_Set_life_protection( THREAD_LIFE_PROTECTED ); _ISR_lock_ISR_disable( &lock_context ); @@ -41,7 +42,6 @@ void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) ); if ( the_mutex->Mutex.nest_count == 1 ) { - the_mutex->previous_thread_life_protection = - previous_thread_life_protection; + the_mutex->previous_thread_life_state = previous_thread_life_state; } } |