summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadchangepriority.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-10 18:47:35 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-10 18:47:35 +0000
commit45d406f8e91368a90b69868756865eefc58eee4a (patch)
tree62329dab332b2822224cf7d1ee29654923590eba /cpukit/score/src/threadchangepriority.c
parent2007-05-10 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-45d406f8e91368a90b69868756865eefc58eee4a.tar.bz2
2007-05-10 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1241/rtems * score/src/threadchangepriority.c, score/src/threadqrequeue.c: Close critical section window added with requeueing support.
Diffstat (limited to 'cpukit/score/src/threadchangepriority.c')
-rw-r--r--cpukit/score/src/threadchangepriority.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cpukit/score/src/threadchangepriority.c b/cpukit/score/src/threadchangepriority.c
index 9847f54f80..70ec45cb51 100644
--- a/cpukit/score/src/threadchangepriority.c
+++ b/cpukit/score/src/threadchangepriority.c
@@ -95,13 +95,11 @@ void _Thread_Change_priority(
*/
state = the_thread->current_state;
if ( state != STATES_TRANSIENT ) {
+ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
+ _ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
- _ISR_Enable( level );
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
- _ISR_Disable( level ); /* redisable so state is cleared with ISR off */
}
- the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
- _ISR_Enable( level );
return;
}