summaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-17 21:32:21 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-17 21:32:21 +0000
commite9faebc794c798462a34d5fae9c922d46e95a374 (patch)
tree41f650510bb4f327ed7bf981fac39bef006d8bb7 /nuttx/arch
parent054179a134bf123279f6c3774a773d838e95c181 (diff)
downloadpx4-nuttx-e9faebc794c798462a34d5fae9c922d46e95a374.tar.gz
px4-nuttx-e9faebc794c798462a34d5fae9c922d46e95a374.tar.bz2
px4-nuttx-e9faebc794c798462a34d5fae9c922d46e95a374.zip
Add test of roundrobin scheduler (still does not work)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@81 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/c5471/src/up_reprioritizertr.c3
-rw-r--r--nuttx/arch/dm320/src/up_reprioritizertr.c3
-rw-r--r--nuttx/arch/pjrc-8051/src/up_reprioritizertr.c4
-rw-r--r--nuttx/arch/sim/defconfig2
4 files changed, 7 insertions, 5 deletions
diff --git a/nuttx/arch/c5471/src/up_reprioritizertr.c b/nuttx/arch/c5471/src/up_reprioritizertr.c
index 414b410d0..b416d7dfe 100644
--- a/nuttx/arch/c5471/src/up_reprioritizertr.c
+++ b/nuttx/arch/c5471/src/up_reprioritizertr.c
@@ -155,12 +155,13 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
up_copystate(current_regs, rtcb->xcp.regs);
}
+
/* Copy the exception context into the TCB at the (old) head of the
* g_readytorun Task list. if up_saveusercontext returns a non-zero
* value, then this is really the previously running task restarting!
*/
- if (!up_saveusercontext(rtcb->xcp.regs))
+ else if (!up_saveusercontext(rtcb->xcp.regs))
{
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
diff --git a/nuttx/arch/dm320/src/up_reprioritizertr.c b/nuttx/arch/dm320/src/up_reprioritizertr.c
index 414b410d0..b416d7dfe 100644
--- a/nuttx/arch/dm320/src/up_reprioritizertr.c
+++ b/nuttx/arch/dm320/src/up_reprioritizertr.c
@@ -155,12 +155,13 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
up_copystate(current_regs, rtcb->xcp.regs);
}
+
/* Copy the exception context into the TCB at the (old) head of the
* g_readytorun Task list. if up_saveusercontext returns a non-zero
* value, then this is really the previously running task restarting!
*/
- if (!up_saveusercontext(rtcb->xcp.regs))
+ else if (!up_saveusercontext(rtcb->xcp.regs))
{
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
diff --git a/nuttx/arch/pjrc-8051/src/up_reprioritizertr.c b/nuttx/arch/pjrc-8051/src/up_reprioritizertr.c
index 1b8a3adbf..b148e755c 100644
--- a/nuttx/arch/pjrc-8051/src/up_reprioritizertr.c
+++ b/nuttx/arch/pjrc-8051/src/up_reprioritizertr.c
@@ -134,7 +134,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority)
sched_mergepending();
}
- /* Are we in an interrupt handler? */
+ /* Are we in an interrupt handler? */
if (g_irqtos)
{
@@ -163,7 +163,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority)
* value, then this is really the previously running task restarting!
*/
- if (!up_savecontext(&rtcb->xcp))
+ else if (!up_savecontext(&rtcb->xcp))
{
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
diff --git a/nuttx/arch/sim/defconfig b/nuttx/arch/sim/defconfig
index bff4ac404..910623d1c 100644
--- a/nuttx/arch/sim/defconfig
+++ b/nuttx/arch/sim/defconfig
@@ -73,7 +73,7 @@ CONFIG_DEBUG=y
CONFIG_DEBUG_VERBOSE=y
CONFIG_MM_REGIONS=1
CONFIG_ARCH_LOWPUTC=y
-CONFIG_RR_INTERVAL=200
+CONFIG_RR_INTERVAL=0
CONFIG_SCHED_INSTRUMENTATION=n
CONFIG_TASK_NAME_SIZE=32
CONFIG_START_YEAR=2007