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
@@ -591,10 +591,10 @@ o SMP
The log below was reported is Nuttx running on two cores
Cortex-A7 architecture in SMP mode. You can notice see that
when sched_addreadytorun() was called, the g_cpu_irqset is 3.
when nxsched_add_readytorun() was called, the g_cpu_irqset is 3.
sched_addreadytorun: irqset cpu 1, me 0 btcbname init, irqset 1 irqcount 2.
sched_addreadytorun: sched_addreadytorun line 338 g_cpu_irqset = 3.
nxsched_add_readytorun: irqset cpu 1, me 0 btcbname init, irqset 1 irqcount 2.
nxsched_add_readytorun: nxsched_add_readytorun line 338 g_cpu_irqset = 3.
This can happen, but only under a very certain condition.
g_cpu_irqset only exists to support this certain condition:
+3 -3
View File
@@ -89,11 +89,11 @@ void up_block_task(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
@@ -101,7 +101,7 @@ void up_block_task(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
@@ -56,7 +56,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
@@ -83,25 +83,25 @@ void up_reprioritize_rtr(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 */
@@ -114,7 +114,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -65,13 +65,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -73,11 +73,11 @@ void up_block_task(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
@@ -85,7 +85,7 @@ void up_block_task(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
@@ -55,7 +55,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
@@ -82,24 +82,24 @@ void up_reprioritize_rtr(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 removed the head
* nxsched_remove_readytorun will return true if we just removed 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 ready-to-run task list. sched_addreadytorun
/* Return the task to the ready-to-run task list. nxsched_add_readytorun
* will return true if the task was added to the head of ready-to-run
* 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 (i.e. if the head
* of the ready-to-run list is no longer the same).
@@ -114,7 +114,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -63,13 +63,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -89,11 +89,11 @@ void up_block_task(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
@@ -101,7 +101,7 @@ void up_block_task(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
@@ -55,7 +55,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
@@ -83,25 +83,25 @@ void up_reprioritize_rtr(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 */
@@ -114,7 +114,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -78,13 +78,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -73,11 +73,11 @@ void up_block_task(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
@@ -85,7 +85,7 @@ void up_block_task(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)
sched_lock();
#endif
if (sched_mergepending())
if (nxsched_merge_pending())
{
/* The currently active task has changed! We will need to switch
* contexts.
+5 -5
View File
@@ -82,24 +82,24 @@ void up_reprioritize_rtr(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 removed the head
* nxsched_remove_readytorun will return true if we just removed 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 ready-to-run task list. sched_addreadytorun
/* Return the task to the ready-to-run task list. nxsched_add_readytorun
* will return true if the task was added to the head of ready-to-run
* 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 (i.e. if the head
* of the ready-to-run list is no longer the same).
@@ -114,7 +114,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -64,13 +64,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -89,11 +89,11 @@ void up_block_task(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
@@ -101,7 +101,7 @@ void up_block_task(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
@@ -56,7 +56,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
@@ -83,25 +83,25 @@ void up_reprioritize_rtr(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 */
@@ -114,7 +114,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -77,13 +77,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -73,11 +73,11 @@ void up_block_task(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
@@ -85,7 +85,7 @@ void up_block_task(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)
sched_lock();
#endif
if (sched_mergepending())
if (nxsched_merge_pending())
{
/* The currently active task has changed! We will need to switch
* contexts.
+5 -5
View File
@@ -82,24 +82,24 @@ void up_reprioritize_rtr(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 removed the head
* nxsched_remove_readytorun will return true if we just removed 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 ready-to-run task list. sched_addreadytorun
/* Return the task to the ready-to-run task list. nxsched_add_readytorun
* will return true if the task was added to the head of ready-to-run
* 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 (i.e. if the head
* of the ready-to-run list is no longer the same).
@@ -114,7 +114,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -64,13 +64,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -88,11 +88,11 @@ void up_block_task(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
@@ -100,7 +100,7 @@ void up_block_task(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
@@ -55,7 +55,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
@@ -82,25 +82,25 @@ void up_reprioritize_rtr(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 */
@@ -113,7 +113,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -79,13 +79,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -89,11 +89,11 @@ void up_block_task(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
@@ -101,7 +101,7 @@ void up_block_task(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
@@ -56,7 +56,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
@@ -83,25 +83,25 @@ void up_reprioritize_rtr(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 */
@@ -114,7 +114,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -80,13 +80,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -74,11 +74,11 @@ void up_block_task(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
@@ -86,7 +86,7 @@ void up_block_task(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
@@ -55,7 +55,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
@@ -83,25 +83,25 @@ void up_reprioritize_rtr(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 */
@@ -114,7 +114,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -65,13 +65,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -90,11 +90,11 @@ void up_block_task(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
@@ -102,7 +102,7 @@ void up_block_task(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
@@ -75,7 +75,7 @@ void up_release_pending(void)
/* sched_lock(); */
if (sched_mergepending())
if (nxsched_merge_pending())
{
/* The currently active task has changed! We will need to switch
* contexts.
+5 -5
View File
@@ -100,25 +100,25 @@ void up_reprioritize_rtr(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 */
@@ -131,7 +131,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -82,13 +82,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -91,11 +91,11 @@ void up_block_task(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
@@ -103,7 +103,7 @@ void up_block_task(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
@@ -74,7 +74,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
@@ -85,25 +85,25 @@ void up_reprioritize_rtr(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 */
@@ -116,7 +116,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -83,13 +83,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -91,11 +91,11 @@ void up_block_task(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
@@ -103,7 +103,7 @@ void up_block_task(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 */
@@ -76,7 +76,7 @@ void up_release_pending(void)
/* sched_lock(); */
if (sched_mergepending())
if (nxsched_merge_pending())
{
/* The currently active task has changed! We will need to switch
* contexts. Update scheduler parameters.
@@ -85,24 +85,24 @@ void up_reprioritize_rtr(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 remove the
* 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 added to the
* 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 */
@@ -115,7 +115,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
if (g_pendingtasks.head)
{
sched_mergepending();
nxsched_merge_pending();
}
/* Update scheduler parameters */
+2 -2
View File
@@ -83,13 +83,13 @@ void up_unblock_task(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.
+3 -3
View File
@@ -89,11 +89,11 @@ void up_block_task(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
@@ -101,7 +101,7 @@ void up_block_task(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 */

Some files were not shown because too many files have changed in this diff Show More