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
This commit is contained in:
patacongo 2007-03-19 14:21:39 +00:00
parent 6d9006c0f5
commit be6b34d86f
8 changed files with 28 additions and 23 deletions

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */