Update TODO list; Fix a few errors introduced withe the last changes to the sporadic scheduler
This commit is contained in:
parent
3e88b77540
commit
4bdbc387f5
10
TODO
10
TODO
@ -226,6 +226,16 @@ o Task/Scheduler (sched/)
|
|||||||
asynchronous event, the budget will fail to decrement and the
|
asynchronous event, the budget will fail to decrement and the
|
||||||
task will get a larger share of CPU that is deserves in those
|
task will get a larger share of CPU that is deserves in those
|
||||||
cases.
|
cases.
|
||||||
|
|
||||||
|
UPDATE: The hook sched_suspend_scheduler() has been added to
|
||||||
|
all locations where a thread is suspended. This would be
|
||||||
|
the place to assess any partial intervals: You would have to
|
||||||
|
save the current time when the timer is started then when
|
||||||
|
suspended, you would have to assess the elapsed portion of
|
||||||
|
that time and subtract that from the TCB timeslice value.
|
||||||
|
|
||||||
|
The hook is present, but logic has been implemented.
|
||||||
|
|
||||||
Status: Open
|
Status: Open
|
||||||
Priority: Low. I am not aware of any real world issues.
|
Priority: Low. I am not aware of any real world issues.
|
||||||
|
|
||||||
|
2
arch
2
arch
@ -1 +1 @@
|
|||||||
Subproject commit d0dcd3c458ded300407756c300bc39bbfdd9489a
|
Subproject commit 3cf52c8fd170931f7458132589a7ebc8c9f9480c
|
@ -112,7 +112,7 @@ static int sporadic_budget_start(FAR struct tcb_s *tcb,
|
|||||||
/* Start the next replenishment interval */
|
/* Start the next replenishment interval */
|
||||||
|
|
||||||
tcb->timeslice = budget;
|
tcb->timeslice = budget;
|
||||||
tcb->current = budget;
|
sporadic->current = budget;
|
||||||
|
|
||||||
ret = wd_start(&repl->timer, budget, sporadic_budget_expire, 1,
|
ret = wd_start(&repl->timer, budget, sporadic_budget_expire, 1,
|
||||||
(wdentry_t)repl);
|
(wdentry_t)repl);
|
||||||
@ -312,7 +312,7 @@ static int sporadic_interval_start(FAR struct replenishment_s *repl)
|
|||||||
/* Enter the low-priority phase of the replenishment cycle */
|
/* Enter the low-priority phase of the replenishment cycle */
|
||||||
|
|
||||||
tcb->timeslice = 0;
|
tcb->timeslice = 0;
|
||||||
tcb->current = 0;
|
sporadic->current = 0;
|
||||||
|
|
||||||
/* Calculate the remainder of the replenishment interval. This is
|
/* Calculate the remainder of the replenishment interval. This is
|
||||||
* permitted to be zero, in which case we just restart the budget
|
* permitted to be zero, in which case we just restart the budget
|
||||||
@ -673,7 +673,7 @@ int sched_sporadic_stop(FAR struct tcb_s *tcb)
|
|||||||
|
|
||||||
/* The free the container holder the sporadic scheduling parameters */
|
/* The free the container holder the sporadic scheduling parameters */
|
||||||
|
|
||||||
kmm_free(tcb->sporadic);
|
sched_kfree(tcb->sporadic);
|
||||||
tcb->sporadic = NULL;
|
tcb->sporadic = NULL;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@ -873,6 +873,7 @@ uint32_t sched_sporadic_process(FAR struct tcb_s *tcb, uint32_t ticks,
|
|||||||
{
|
{
|
||||||
/* Does the thread have the scheduler locked? */
|
/* Does the thread have the scheduler locked? */
|
||||||
|
|
||||||
|
sporadic = tcb->sporadic;
|
||||||
if (tcb->lockcount > 0)
|
if (tcb->lockcount > 0)
|
||||||
{
|
{
|
||||||
/* Yes... then we have no option but to give the thread more
|
/* Yes... then we have no option but to give the thread more
|
||||||
@ -912,7 +913,6 @@ uint32_t sched_sporadic_process(FAR struct tcb_s *tcb, uint32_t ticks,
|
|||||||
* good thing to do, but is certainly permitted.
|
* good thing to do, but is certainly permitted.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sporadic = tcb->sporadic;
|
|
||||||
if (sporadic->budget >= sporadic->repl_period)
|
if (sporadic->budget >= sporadic->repl_period)
|
||||||
{
|
{
|
||||||
tcb->timeslice = sporadic->budget;
|
tcb->timeslice = sporadic->budget;
|
||||||
|
Loading…
Reference in New Issue
Block a user