Debug can now be selectively enabled by subystem

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@404 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2007-11-23 22:32:52 +00:00
parent f5f117b71d
commit 451f83b3a5
6 changed files with 18 additions and 18 deletions

View File

@ -94,7 +94,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
_TCB *rtcb = (_TCB*)g_readytorun.head;
boolean switch_needed;
dbg("Blocking TCB=%p\n", tcb);
sdbg("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
@ -134,7 +134,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
*/
rtcb = (_TCB*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
@ -143,7 +143,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
if (rtcb->xcp.sigdeliver)
{
dbg("Delivering signals TCB=%p\n", rtcb);
sdbg("Delivering signals TCB=%p\n", rtcb);
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
rtcb->xcp.sigdeliver = NULL;
}

View File

@ -55,7 +55,7 @@
****************************************************************************/
#ifdef VFAT_STANDALONE
# define dbg(format, arg...) printf(format, ##arg)
# define sdbg(format, arg...) printf(format, ##arg)
#endif
/****************************************************************************
@ -218,7 +218,7 @@ char *up_deviceimage(void)
ret = inflateInit(&strm);
if (ret != Z_OK)
{
dbg("inflateInit FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
sdbg("inflateInit FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
return NULL;
}
@ -252,7 +252,7 @@ char *up_deviceimage(void)
case Z_DATA_ERROR:
case Z_MEM_ERROR:
case Z_STREAM_ERROR:
dbg("inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
sdbg("inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
(void)inflateEnd(&strm);
free(pbuffer);
return NULL;

View File

@ -74,7 +74,7 @@ void _exit(int status)
{
_TCB* tcb = (_TCB*)g_readytorun.head;
dbg("TCB=%p exitting\n", tcb);
sdbg("TCB=%p exitting\n", tcb);
/* Remove the tcb task from the ready-to-run list. We can
* ignore the return value because we know that a context
@ -113,7 +113,7 @@ void _exit(int status)
*/
tcb = (_TCB*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", tcb);
sdbg("New Active Task TCB=%p\n", tcb);
/* The way that we handle signals in the simulation is kind of
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
@ -122,7 +122,7 @@ void _exit(int status)
if (tcb->xcp.sigdeliver)
{
dbg("Delivering signals TCB=%p\n", tcb);
sdbg("Delivering signals TCB=%p\n", tcb);
((sig_deliver_t)tcb->xcp.sigdeliver)(tcb);
tcb->xcp.sigdeliver = NULL;
}

View File

@ -76,7 +76,7 @@ void up_release_pending(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
dbg("From TCB=%p\n", rtcb);
sdbg("From TCB=%p\n", rtcb);
/* Merge the g_pendingtasks list into the g_readytorun task list */
@ -96,7 +96,7 @@ void up_release_pending(void)
*/
rtcb = (_TCB*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
@ -105,7 +105,7 @@ void up_release_pending(void)
if (rtcb->xcp.sigdeliver)
{
dbg("Delivering signals TCB=%p\n", rtcb);
sdbg("Delivering signals TCB=%p\n", rtcb);
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
rtcb->xcp.sigdeliver = NULL;
}

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);
sdbg("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
@ -146,7 +146,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
*/
rtcb = (_TCB*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
@ -155,7 +155,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
if (rtcb->xcp.sigdeliver)
{
dbg("Delivering signals TCB=%p\n", rtcb);
sdbg("Delivering signals TCB=%p\n", rtcb);
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
rtcb->xcp.sigdeliver = NULL;
}

View File

@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
dbg("Unblocking TCB=%p\n", tcb);
sdbg("Unblocking TCB=%p\n", tcb);
/* Remove the task from the blocked task list */
@ -124,7 +124,7 @@ void up_unblock_task(_TCB *tcb)
*/
rtcb = (_TCB*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
@ -133,7 +133,7 @@ void up_unblock_task(_TCB *tcb)
if (rtcb->xcp.sigdeliver)
{
dbg("Delivering signals TCB=%p\n", rtcb);
sdbg("Delivering signals TCB=%p\n", rtcb);
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
rtcb->xcp.sigdeliver = NULL;
}