summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulerpriorityblock.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-07 21:19:55 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-20 10:14:02 +0200
commite5ca54c99682a264568d95d8a5db555ea8357e9c (patch)
tree8d0ab9e455831ae28229832937b6e24c243c607d /cpukit/score/src/schedulerpriorityblock.c
parentcorrect memory model in smpatomic test case (diff)
downloadrtems-e5ca54c99682a264568d95d8a5db555ea8357e9c.tar.bz2
score: PR2136: Fix _Thread_Change_priority()
Add call to _Scheduler_Schedule() in missing path after _Thread_Set_transient() in _Thread_Change_priority(). See also sptests/spintrcritical19. Add thread parameter to _Scheduler_Schedule(). This parameter is currently unused but may be used in future SMP schedulers. Do heir selection in _Scheduler_Schedule(). Use _Scheduler_Update_heir() for this in the particular scheduler implementation. Add and use _Scheduler_Generic_block().
Diffstat (limited to 'cpukit/score/src/schedulerpriorityblock.c')
-rw-r--r--cpukit/score/src/schedulerpriorityblock.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/cpukit/score/src/schedulerpriorityblock.c b/cpukit/score/src/schedulerpriorityblock.c
index 9e48101f9e..329ddd7bda 100644
--- a/cpukit/score/src/schedulerpriorityblock.c
+++ b/cpukit/score/src/schedulerpriorityblock.c
@@ -21,20 +21,14 @@
#endif
#include <rtems/score/schedulerpriorityimpl.h>
-#include <rtems/score/threadimpl.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
)
{
- _Scheduler_priority_Ready_queue_extract( the_thread );
-
- /* TODO: flash critical section? */
-
- if ( _Thread_Is_heir( the_thread ) )
- _Scheduler_priority_Schedule_body();
-
- if ( _Thread_Is_executing( the_thread ) )
- _Thread_Dispatch_necessary = true;
-
+ _Scheduler_Generic_block(
+ _Scheduler_priority_Ready_queue_extract,
+ _Scheduler_priority_Schedule_body,
+ the_thread
+ );
}