diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-17 15:06:28 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-17 15:06:28 +0000 |
commit | 375109372b3fb0cbac81f7bb4c6b8f2b372830bf (patch) | |
tree | b00c0c221ec5d658acf8d05994c78e69b325b5d1 /nuttx | |
parent | 5994547752a3f9f30a9dba355bb8afee64fe6b69 (diff) | |
download | px4-nuttx-375109372b3fb0cbac81f7bb4c6b8f2b372830bf.tar.gz px4-nuttx-375109372b3fb0cbac81f7bb4c6b8f2b372830bf.tar.bz2 px4-nuttx-375109372b3fb0cbac81f7bb4c6b8f2b372830bf.zip |
Suppress debug output if CONFIG_DEBUG_SCHED is not defined
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@700 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/arch/z16/src/common/up_assert.c | 34 | ||||
-rw-r--r-- | nuttx/arch/z16/src/common/up_exit.c | 4 | ||||
-rw-r--r-- | nuttx/arch/z16/src/common/up_releasepending.c | 6 | ||||
-rw-r--r-- | nuttx/arch/z16/src/common/up_reprioritizertr.c | 6 | ||||
-rw-r--r-- | nuttx/arch/z80/src/common/up_exit.c | 4 | ||||
-rw-r--r-- | nuttx/arch/z80/src/common/up_releasepending.c | 6 | ||||
-rw-r--r-- | nuttx/arch/z80/src/common/up_reprioritizertr.c | 6 |
7 files changed, 47 insertions, 19 deletions
diff --git a/nuttx/arch/z16/src/common/up_assert.c b/nuttx/arch/z16/src/common/up_assert.c index 9fb6436a0..713097293 100644 --- a/nuttx/arch/z16/src/common/up_assert.c +++ b/nuttx/arch/z16/src/common/up_assert.c @@ -108,7 +108,11 @@ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ * Name: up_assert ****************************************************************************/ +#ifdef CONFIG_HAVE_FILENAME +void up_assert(const ubyte *filename, int lineno) +#else void up_assert(void) +#endif { #if CONFIG_TASK_NAME_SIZE > 0 _TCB *rtcb = (_TCB*)g_readytorun.head; @@ -116,11 +120,21 @@ void up_assert(void) up_ledon(LED_ASSERTION); +#ifdef CONFIG_HAVE_FILENAME #if CONFIG_TASK_NAME_SIZE > 0 - lldbg("Assertion failed in task: %s\n", rtcb->name); + lldbg("Assertion failed at file:%s line: %d task: %s\n", + filename, lineno, rtcb->name); +#else + lldbg("Assertion failed at file:%s line: %d\n", + filename, lineno); +#endif +#else +#if CONFIG_TASK_NAME_SIZE > 0 + lldbg("Assertion failed: task: %s\n", rtcb->name); #else lldbg("Assertion failed\n"); #endif +#endif up_stackdump(); up_registerdump(); @@ -131,7 +145,11 @@ void up_assert(void) * Name: up_assert_code ****************************************************************************/ +#ifdef CONFIG_HAVE_FILENAME +void up_assert_code(const ubyte *filename, int lineno, int errorcode) +#else void up_assert_code(int errorcode) +#endif { #if CONFIG_TASK_NAME_SIZE > 0 _TCB *rtcb = (_TCB*)g_readytorun.head; @@ -139,10 +157,20 @@ void up_assert_code(int errorcode) up_ledon(LED_ASSERTION); +#ifdef CONFIG_HAVE_FILENAME #if CONFIG_TASK_NAME_SIZE > 0 - lldbg("Assertion failed in task: %s error code: %d\n", rtcb->name, errorcode); + lldbg("Assertion failed at file:%s line: %d task: %s error code: %d\n", + filename, lineno, rtcb->name, errorcode); +#else + lldbg("Assertion failed at file:%s line: %d error code: %d\n", + filename, lineno, errorcode); +#endif #else - lldbg("Assertion failed: %d error code: %d\n", errorcode); +#if CONFIG_TASK_NAME_SIZE > 0 + lldbg("Assertion failed: task: %s error code: %d\n", rtcb->name, errorcode); +#else + lldbg("Assertion failed: error code: %d\n", errorcode); +#endif #endif up_stackdump(); diff --git a/nuttx/arch/z16/src/common/up_exit.c b/nuttx/arch/z16/src/common/up_exit.c index b2e18e22b..589f9ca6a 100644 --- a/nuttx/arch/z16/src/common/up_exit.c +++ b/nuttx/arch/z16/src/common/up_exit.c @@ -152,7 +152,7 @@ void _exit(int status) (void)irqsave(); - lldbg("TCB=%p exitting\n", tcb); + slldbg("TCB=%p exitting\n", tcb); #if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) lldbg("Other tasks:\n"); @@ -168,7 +168,7 @@ void _exit(int status) */ tcb = (FAR _TCB*)g_readytorun.head; - lldbg("New Active Task TCB=%p\n", tcb); + slldbg("New Active Task TCB=%p\n", tcb); /* Then switch contexts */ diff --git a/nuttx/arch/z16/src/common/up_releasepending.c b/nuttx/arch/z16/src/common/up_releasepending.c index 699b61997..0160dd047 100644 --- a/nuttx/arch/z16/src/common/up_releasepending.c +++ b/nuttx/arch/z16/src/common/up_releasepending.c @@ -80,7 +80,7 @@ void up_release_pending(void) { FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head; - lldbg("From TCB=%p\n", rtcb); + slldbg("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the g_readytorun task list */ @@ -105,7 +105,7 @@ void up_release_pending(void) */ rtcb = (FAR _TCB*)g_readytorun.head; - lldbg("New Active Task TCB=%p\n", rtcb); + slldbg("New Active Task TCB=%p\n", rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. @@ -127,7 +127,7 @@ void up_release_pending(void) */ rtcb = (FAR _TCB*)g_readytorun.head; - lldbg("New Active Task TCB=%p\n", rtcb); + slldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ diff --git a/nuttx/arch/z16/src/common/up_reprioritizertr.c b/nuttx/arch/z16/src/common/up_reprioritizertr.c index d8ef42ddd..e9c6a8a1e 100644 --- a/nuttx/arch/z16/src/common/up_reprioritizertr.c +++ b/nuttx/arch/z16/src/common/up_reprioritizertr.c @@ -101,7 +101,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority) FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head; boolean switch_needed; - lldbg("TCB=%p PRI=%d\n", tcb, priority); + slldbg("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 @@ -153,7 +153,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority) */ rtcb = (FAR _TCB*)g_readytorun.head; - lldbg("New Active Task TCB=%p\n", rtcb); + slldbg("New Active Task TCB=%p\n", rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. @@ -174,7 +174,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority) */ rtcb = (FAR _TCB*)g_readytorun.head; - lldbg("New Active Task TCB=%p\n", rtcb); + slldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ diff --git a/nuttx/arch/z80/src/common/up_exit.c b/nuttx/arch/z80/src/common/up_exit.c index 45409800e..b56f286cd 100644 --- a/nuttx/arch/z80/src/common/up_exit.c +++ b/nuttx/arch/z80/src/common/up_exit.c @@ -152,7 +152,7 @@ void _exit(int status) (void)irqsave(); - lldbg("TCB=%p exitting\n", tcb); + slldbg("TCB=%p exitting\n", tcb); #if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) lldbg("Other tasks:\n"); @@ -168,7 +168,7 @@ void _exit(int status) */ tcb = (FAR _TCB*)g_readytorun.head; - lldbg("New Active Task TCB=%p\n", tcb); + slldbg("New Active Task TCB=%p\n", tcb); /* Then switch contexts */ diff --git a/nuttx/arch/z80/src/common/up_releasepending.c b/nuttx/arch/z80/src/common/up_releasepending.c index e4048152f..bfe35d2a7 100644 --- a/nuttx/arch/z80/src/common/up_releasepending.c +++ b/nuttx/arch/z80/src/common/up_releasepending.c @@ -81,7 +81,7 @@ void up_release_pending(void) { FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head; - lldbg("From TCB=%p\n", rtcb); + slldbg("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the g_readytorun task list */ @@ -106,7 +106,7 @@ void up_release_pending(void) */ rtcb = (FAR _TCB*)g_readytorun.head; - lldbg("New Active Task TCB=%p\n", rtcb); + slldbg("New Active Task TCB=%p\n", rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. @@ -128,7 +128,7 @@ void up_release_pending(void) */ rtcb = (FAR _TCB*)g_readytorun.head; - lldbg("New Active Task TCB=%p\n", rtcb); + slldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ diff --git a/nuttx/arch/z80/src/common/up_reprioritizertr.c b/nuttx/arch/z80/src/common/up_reprioritizertr.c index 4576852ac..72e550d89 100644 --- a/nuttx/arch/z80/src/common/up_reprioritizertr.c +++ b/nuttx/arch/z80/src/common/up_reprioritizertr.c @@ -102,7 +102,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority) FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head; boolean switch_needed; - lldbg("TCB=%p PRI=%d\n", tcb, priority); + slldbg("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 @@ -154,7 +154,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority) */ rtcb = (FAR _TCB*)g_readytorun.head; - lldbg("New Active Task TCB=%p\n", rtcb); + slldbg("New Active Task TCB=%p\n", rtcb); /* Then setup so that the context will be performed on exit * from the interrupt. @@ -175,7 +175,7 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority) */ rtcb = (FAR _TCB*)g_readytorun.head; - lldbg("New Active Task TCB=%p\n", rtcb); + slldbg("New Active Task TCB=%p\n", rtcb); /* Then switch contexts */ |