diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-19 14:21:39 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-19 14:21:39 +0000 |
commit | 35aaf2d6d6776ea47729eb80efb15e04671ab316 (patch) | |
tree | 1a7b1790b66a47286ae5fb9f466d1218c3f86a52 /nuttx | |
parent | 33b49f60be637f06f385d2ede26846a636621396 (diff) | |
download | px4-nuttx-35aaf2d6d6776ea47729eb80efb15e04671ab316.tar.gz px4-nuttx-35aaf2d6d6776ea47729eb80efb15e04671ab316.tar.bz2 px4-nuttx-35aaf2d6d6776ea47729eb80efb15e04671ab316.zip |
Cannot use dbg() macro in middle of context switch if output is to console driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@88 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/arch/c5471/src/up_blocktask.c | 6 | ||||
-rw-r--r-- | nuttx/arch/c5471/src/up_releasepending.c | 6 | ||||
-rw-r--r-- | nuttx/arch/c5471/src/up_reprioritizertr.c | 6 | ||||
-rw-r--r-- | nuttx/arch/c5471/src/up_unblocktask.c | 9 | ||||
-rw-r--r-- | nuttx/arch/dm320/src/up_blocktask.c | 6 | ||||
-rw-r--r-- | nuttx/arch/dm320/src/up_releasepending.c | 6 | ||||
-rw-r--r-- | nuttx/arch/dm320/src/up_reprioritizertr.c | 6 | ||||
-rw-r--r-- | nuttx/arch/dm320/src/up_unblocktask.c | 6 |
8 files changed, 28 insertions, 23 deletions
diff --git a/nuttx/arch/c5471/src/up_blocktask.c b/nuttx/arch/c5471/src/up_blocktask.c index 5e0693e2e..ce2f430ff 100644 --- a/nuttx/arch/c5471/src/up_blocktask.c +++ b/nuttx/arch/c5471/src/up_blocktask.c @@ -95,6 +95,8 @@ void up_block_task(_TCB *tcb, tstate_t task_state) _TCB *rtcb = (_TCB*)g_readytorun.head; boolean switch_needed; + lldbg("Blocking TCB=%p\n", tcb); + /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the * most likely case), then a context switch to the next @@ -136,7 +138,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ @@ -155,7 +157,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ diff --git a/nuttx/arch/c5471/src/up_releasepending.c b/nuttx/arch/c5471/src/up_releasepending.c index c1b5a8850..2b4179687 100644 --- a/nuttx/arch/c5471/src/up_releasepending.c +++ b/nuttx/arch/c5471/src/up_releasepending.c @@ -76,7 +76,7 @@ void up_release_pending(void) { _TCB *rtcb = (_TCB*)g_readytorun.head; - dbg("From TCB=%p\n", rtcb); + lldbg("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the g_readytorun task list */ @@ -101,7 +101,7 @@ void up_release_pending(void) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ @@ -121,7 +121,7 @@ void up_release_pending(void) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ diff --git a/nuttx/arch/c5471/src/up_reprioritizertr.c b/nuttx/arch/c5471/src/up_reprioritizertr.c index b416d7dfe..58f31bba5 100644 --- a/nuttx/arch/c5471/src/up_reprioritizertr.c +++ b/nuttx/arch/c5471/src/up_reprioritizertr.c @@ -97,7 +97,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority) _TCB *rtcb = (_TCB*)g_readytorun.head; boolean switch_needed; - dbg("TCB=%p PRI=%d\n", tcb, priority); + lldbg("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 @@ -149,7 +149,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ @@ -168,7 +168,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ diff --git a/nuttx/arch/c5471/src/up_unblocktask.c b/nuttx/arch/c5471/src/up_unblocktask.c index 98cc042ba..a51a5d621 100644 --- a/nuttx/arch/c5471/src/up_unblocktask.c +++ b/nuttx/arch/c5471/src/up_unblocktask.c @@ -80,6 +80,7 @@ void up_unblock_task(_TCB *tcb) { /* Verify that the context switch can be performed */ + if ((tcb->task_state < FIRST_BLOCKED_STATE) || (tcb->task_state > LAST_BLOCKED_STATE)) { @@ -89,7 +90,7 @@ void up_unblock_task(_TCB *tcb) { _TCB *rtcb = (_TCB*)g_readytorun.head; - dbg("Unblocking TCB=%p\n", tcb); + lldbg("Unblocking TCB=%p\n", tcb); /* Remove the task from the blocked task list */ @@ -128,14 +129,14 @@ void up_unblock_task(_TCB *tcb) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ up_copystate(current_regs, rtcb->xcp.regs); } - /* We are not in an interrupt andler. Copy the user C context + /* We are not in an interrupt handler. Copy the user C context * into the TCB of the task that was previously active. if * up_saveusercontext returns a non-zero value, then this is really the * previously running task restarting! @@ -149,7 +150,7 @@ void up_unblock_task(_TCB *tcb) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ diff --git a/nuttx/arch/dm320/src/up_blocktask.c b/nuttx/arch/dm320/src/up_blocktask.c index 5e0693e2e..ce2f430ff 100644 --- a/nuttx/arch/dm320/src/up_blocktask.c +++ b/nuttx/arch/dm320/src/up_blocktask.c @@ -95,6 +95,8 @@ void up_block_task(_TCB *tcb, tstate_t task_state) _TCB *rtcb = (_TCB*)g_readytorun.head; boolean switch_needed; + lldbg("Blocking TCB=%p\n", tcb); + /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the * most likely case), then a context switch to the next @@ -136,7 +138,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ @@ -155,7 +157,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ diff --git a/nuttx/arch/dm320/src/up_releasepending.c b/nuttx/arch/dm320/src/up_releasepending.c index c1b5a8850..2b4179687 100644 --- a/nuttx/arch/dm320/src/up_releasepending.c +++ b/nuttx/arch/dm320/src/up_releasepending.c @@ -76,7 +76,7 @@ void up_release_pending(void) { _TCB *rtcb = (_TCB*)g_readytorun.head; - dbg("From TCB=%p\n", rtcb); + lldbg("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the g_readytorun task list */ @@ -101,7 +101,7 @@ void up_release_pending(void) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ @@ -121,7 +121,7 @@ void up_release_pending(void) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ diff --git a/nuttx/arch/dm320/src/up_reprioritizertr.c b/nuttx/arch/dm320/src/up_reprioritizertr.c index b416d7dfe..58f31bba5 100644 --- a/nuttx/arch/dm320/src/up_reprioritizertr.c +++ b/nuttx/arch/dm320/src/up_reprioritizertr.c @@ -97,7 +97,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority) _TCB *rtcb = (_TCB*)g_readytorun.head; boolean switch_needed; - dbg("TCB=%p PRI=%d\n", tcb, priority); + lldbg("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 @@ -149,7 +149,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ @@ -168,7 +168,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ diff --git a/nuttx/arch/dm320/src/up_unblocktask.c b/nuttx/arch/dm320/src/up_unblocktask.c index 98cc042ba..15efb7a47 100644 --- a/nuttx/arch/dm320/src/up_unblocktask.c +++ b/nuttx/arch/dm320/src/up_unblocktask.c @@ -89,7 +89,7 @@ void up_unblock_task(_TCB *tcb) { _TCB *rtcb = (_TCB*)g_readytorun.head; - dbg("Unblocking TCB=%p\n", tcb); + lldbg("Unblocking TCB=%p\n", tcb); /* Remove the task from the blocked task list */ @@ -128,7 +128,7 @@ void up_unblock_task(_TCB *tcb) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ @@ -149,7 +149,7 @@ void up_unblock_task(_TCB *tcb) */ rtcb = (_TCB*)g_readytorun.head; - dbg("New Active Task TCB=%p\n", rtcb); + lldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ |