diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-07-05 13:37:10 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-07-27 10:55:30 +0200 |
commit | 3a58dc863157bb21054a144c1a21b690544c0d23 (patch) | |
tree | 254e87635343490eca3a41d34a6da2609b29e6d7 /cpukit/score/src/threadqenqueue.c | |
parent | score: Simplify _Thread_queue_Boost_priority() (diff) | |
download | rtems-3a58dc863157bb21054a144c1a21b690544c0d23.tar.bz2 |
score: Priority inherit thread queue operations
Move the priority change due to priority interitance to the thread queue
enqueue operation to simplify the locking on SMP configurations.
Update #2412.
Update #2556.
Update #2765.
Diffstat (limited to 'cpukit/score/src/threadqenqueue.c')
-rw-r--r-- | cpukit/score/src/threadqenqueue.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c index 1528b48170..818073c2b1 100644 --- a/cpukit/score/src/threadqenqueue.c +++ b/cpukit/score/src/threadqenqueue.c @@ -42,8 +42,9 @@ void _Thread_queue_Enqueue_critical( Thread_queue_Context *queue_context ) { - Per_CPU_Control *cpu_self; - bool success; + Thread_queue_Path path; + Per_CPU_Control *cpu_self; + bool success; #if defined(RTEMS_MULTIPROCESSING) if ( _Thread_MP_Is_receive( the_thread ) && the_thread->receive_packet ) { @@ -57,7 +58,7 @@ void _Thread_queue_Enqueue_critical( _Thread_Wait_set_queue( the_thread, queue ); _Thread_Wait_set_operations( the_thread, operations ); - ( *operations->enqueue )( queue, the_thread ); + ( *operations->enqueue )( queue, the_thread, &path ); _Thread_Wait_flags_set( the_thread, THREAD_QUEUE_INTEND_TO_BLOCK ); cpu_self = _Thread_Dispatch_disable_critical( &queue_context->Lock_context ); @@ -124,6 +125,7 @@ void _Thread_queue_Enqueue_critical( _Thread_Remove_timer_and_unblock( the_thread, queue ); } + _Thread_Update_priority( path.update_priority ); _Thread_Dispatch_enable( cpu_self ); } |