[rtems commit] score: Remove hidden deadline overrule for CBS
Sebastian Huber
sebh at rtems.org
Wed Jun 22 12:47:51 UTC 2016
Module: rtems
Branch: master
Commit: 7ec66e0890c65f3fdfed9db91a4ae59de6a8ff18
Changeset: http://git.rtems.org/rtems/commit/?id=7ec66e0890c65f3fdfed9db91a4ae59de6a8ff18
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Jun 16 17:23:16 2016 +0200
score: Remove hidden deadline overrule for CBS
Do what the user commands. Maybe we should add a rtems_cbs_period()
that calls rtems_rate_monotonic_period() with the right parameter.
Update #2173.
---
cpukit/score/src/schedulercbsreleasejob.c | 30 ++++++++----------------------
1 file changed, 8 insertions(+), 22 deletions(-)
diff --git a/cpukit/score/src/schedulercbsreleasejob.c b/cpukit/score/src/schedulercbsreleasejob.c
index a9f8e33..b820829 100644
--- a/cpukit/score/src/schedulercbsreleasejob.c
+++ b/cpukit/score/src/schedulercbsreleasejob.c
@@ -20,8 +20,6 @@
#endif
#include <rtems/score/schedulercbsimpl.h>
-#include <rtems/score/threadimpl.h>
-#include <rtems/score/watchdogimpl.h>
void _Scheduler_CBS_Release_job(
const Scheduler_Control *scheduler,
@@ -29,28 +27,16 @@ void _Scheduler_CBS_Release_job(
uint32_t deadline
)
{
- Scheduler_CBS_Node *node = _Scheduler_CBS_Thread_get_node( the_thread );
- Scheduler_CBS_Server *serv_info = node->cbs_server;
- Priority_Control new_priority;
- Priority_Control unused;
+ Scheduler_CBS_Node *node;
+ Scheduler_CBS_Server *serv_info;
- if (deadline) {
- /* Initializing or shifting deadline. */
- if (serv_info)
- new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
- & ~SCHEDULER_EDF_PRIO_MSB;
- else
- new_priority = (_Watchdog_Ticks_since_boot + deadline)
- & ~SCHEDULER_EDF_PRIO_MSB;
- }
- else {
- /* Switch back to background priority. */
- new_priority = the_thread->Start.initial_priority;
- }
+ _Scheduler_EDF_Release_job( scheduler, the_thread, deadline );
+
+ node = _Scheduler_CBS_Thread_get_node( the_thread );
+ serv_info = node->cbs_server;
/* Budget replenishment for the next job. */
- if (serv_info)
+ if ( serv_info != NULL ) {
the_thread->cpu_time_budget = serv_info->parameters.budget;
-
- _Thread_Set_priority( the_thread, new_priority, &unused, true );
+ }
}
More information about the vc
mailing list