sched/sched/sched.h: Make naming of all internal names consistent:

1. Add internal scheduler functions should begin with nxsched_, not sched_
2. Follow the consistent naming patter of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
This commit is contained in:
Gregory Nutt
2020-05-09 12:40:14 -06:00
committed by Alan Carvalho de Assis
parent 4b44b628ea
commit f92dba212d
134 changed files with 508 additions and 523 deletions
+3 -3
View File
@@ -77,11 +77,11 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state)
* it should also be true that rtcb == tcb.
*/
switch_needed = sched_removereadytorun(tcb);
switch_needed = nxsched_remove_readytorun(tcb);
/* Add the task to the specified blocked task list */
sched_addblocked(tcb, (tstate_t)task_state);
nxsched_add_blocked(tcb, (tstate_t)task_state);
/* If there are any pending tasks, then add them to the ready-to-run
* task list now
@@ -89,7 +89,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state)
if (g_pendingtasks.head)
{
switch_needed |= sched_mergepending();
switch_needed |= nxsched_merge_pending();
}
/* Now, perform the context switch if one is needed */
+1 -1
View File
@@ -59,7 +59,7 @@ void up_release_pending(void)
/* Merge the g_pendingtasks list into the ready-to-run task list */
if (sched_mergepending())
if (nxsched_merge_pending())
{
/* The currently active task has changed! We will need to switch
* contexts.
+5 -5
View File
@@ -86,25 +86,25 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority)
sinfo("TCB=%p PRI=%d\n", tcb, priority);
/* Remove the tcb task from the ready-to-run list.
* sched_removereadytorun will return true if we just
* nxsched_remove_readytorun will return true if we just
* remove the head of the ready to run list.
*/
switch_needed = sched_removereadytorun(tcb);
switch_needed = nxsched_remove_readytorun(tcb);
/* Setup up the new task priority */
tcb->sched_priority = (uint8_t)priority;
/* Return the task to the specified blocked task list.
* sched_addreadytorun will return true if the task was
* nxsched_add_readytorun will return true if the task was
* added to the new list. We will need to perform a context
* switch only if the EXCLUSIVE or of the two calls is non-zero
* (i.e., one and only one the calls changes the head of the
* ready-to-run list).
*/
switch_needed ^= sched_addreadytorun(tcb);
switch_needed ^= nxsched_add_readytorun(tcb);
/* Now, perform the context switch if one is needed */
@@ -117,7 +117,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -70,13 +70,13 @@ void up_unblock_task(FAR struct tcb_s *tcb)
/* Remove the task from the blocked task list */
sched_removeblocked(tcb);
nxsched_remove_blocked(tcb);
/* Add the task in the correct location in the prioritized
* ready-to-run task list
*/
if (sched_addreadytorun(tcb))
if (nxsched_add_readytorun(tcb))
{
/* The currently active task has changed! We need to do
* a context switch to the new task.