diff --git a/arch/arm/src/c5471/c5471_ethernet.c b/arch/arm/src/c5471/c5471_ethernet.c index 38d894e74e5..8d08b48e4a4 100644 --- a/arch/arm/src/c5471/c5471_ethernet.c +++ b/arch/arm/src/c5471/c5471_ethernet.c @@ -737,22 +737,22 @@ static int c5471_phyinit (void) phyid = (c5471_mdread(0, MD_PHY_MSB_REG) << 16) | c5471_mdread(0, MD_PHY_LSB_REG); if (phyid != LU3X31_T64_PHYID) { - nerr("Unrecognized PHY ID: %08x\n", phyid); + nerr("ERROR: Unrecognized PHY ID: %08x\n", phyid); return ERROR; } /* Next, Set desired network rate, 10BaseT, 100BaseT, or auto. */ #ifdef CONFIG_C5471_AUTONEGOTIATION - nerr("Setting PHY Transceiver for Autonegotiation\n"); + ninfo("Setting PHY Transceiver for Autonegotiation\n"); c5471_mdwrite(0, MD_PHY_CONTROL_REG, MODE_AUTONEG); #endif #ifdef CONFIG_C5471_BASET100 - nerr("Setting PHY Transceiver for 100BaseT FullDuplex\n"); + ninfo("Setting PHY Transceiver for 100BaseT FullDuplex\n"); c5471_mdwrite(0, MD_PHY_CONTROL_REG, MODE_100MBIT_FULLDUP); #endif #ifdef CONFIG_C5471_BASET10 - nerr("Setting PHY Transceiver for 10BaseT FullDuplex\n"); + ninfo("Setting PHY Transceiver for 10BaseT FullDuplex\n"); c5471_mdwrite(0, MD_PHY_CONTROL_REG, MODE_10MBIT_FULLDUP); #endif @@ -1371,7 +1371,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) { /* Increment the count of dropped packets */ - nerr("Too big! packetlen: %d\n", packetlen); + nwarn("WARNING: Too big! packetlen: %d\n", packetlen); c5471->c_rxdropped++; } #endif @@ -1680,9 +1680,9 @@ static int c5471_ifup(struct net_driver_s *dev) struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; volatile uint32_t clearbits; - nerr("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Initilize Ethernet interface */ @@ -1742,7 +1742,7 @@ static int c5471_ifdown(struct net_driver_s *dev) struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; irqstate_t flags; - nerr("Stopping\n"); + ninfo("Stopping\n"); /* Disable the Ethernet interrupt */ @@ -1798,7 +1798,7 @@ static int c5471_txavail(struct net_driver_s *dev) struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; irqstate_t flags; - nerr("Polling\n"); + ninfo("Polling\n"); flags = enter_critical_section(); /* Ignore the notification if the interface is not yet up */ @@ -1951,7 +1951,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) /* TX ENET 0 */ - nerr("TX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf); + ninfo("TX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf); putreg32((desc & 0x0000ffff), ENET0_TDBA); /* 16-bit offset address */ for (i = NUM_DESC_TX-1; i >= 0; i--) { @@ -1978,7 +1978,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) /* RX ENET 0 */ - nerr("RX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf); + ninfo("RX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf); putreg32((desc & 0x0000ffff), ENET0_RDBA); /* 16-bit offset address */ for (i = NUM_DESC_RX-1; i >= 0; i--) { @@ -2005,7 +2005,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) /* TX CPU */ - nerr("TX CPU desc: %08x pbuf: %08x\n", desc, pbuf); + ninfo("TX CPU desc: %08x pbuf: %08x\n", desc, pbuf); c5471->c_txcpudesc = desc; putreg32((desc & 0x0000ffff), EIM_CPU_TXBA); /* 16-bit offset address */ for (i = NUM_DESC_TX-1; i >= 0; i--) @@ -2035,7 +2035,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) /* RX CPU */ - nerr("RX CPU desc: %08x pbuf: %08x\n", desc, pbuf); + ninfo("RX CPU desc: %08x pbuf: %08x\n", desc, pbuf); c5471->c_rxcpudesc = desc; putreg32((desc & 0x0000ffff), EIM_CPU_RXBA); /* 16-bit offset address */ for (i = NUM_DESC_RX-1; i >= 0; i--) @@ -2063,7 +2063,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) pbuf += sizeof(uint32_t); /* Ether Module's "Buffer Usage Word" */ } - nerr("END desc: %08x pbuf: %08x\n", desc, pbuf); + ninfo("END desc: %08x pbuf: %08x\n", desc, pbuf); /* Save the descriptor packet size */ @@ -2150,13 +2150,13 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) static void c5471_reset(struct c5471_driver_s *c5471) { #if defined(CONFIG_C5471_PHY_LU3X31T_T64) - nerr("EIM reset\n"); + ninfo("EIM reset\n"); c5471_eimreset(c5471); #endif - nerr("PHY init\n"); + ninfo("PHY init\n"); c5471_phyinit(); - nerr("EIM config\n"); + ninfo("EIM config\n"); c5471_eimconfig(c5471); } @@ -2178,7 +2178,7 @@ static void c5471_macassign(struct c5471_driver_s *c5471) uint8_t *mptr = dev->d_mac.ether_addr_octet; register uint32_t tmp; - nerr("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n", + ninfo("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n", mptr[0], mptr[1], mptr[2], mptr[3], mptr[4], mptr[5]); /* Set CPU port MAC address. S/W will only see incoming packets that match @@ -2241,7 +2241,7 @@ void up_netinitialize(void) { /* We could not attach the ISR to the ISR */ - nllerr("irq_attach() failed\n"); + nllerr("ERROR: irq_attach() failed\n"); return; } diff --git a/arch/arm/src/c5471/c5471_watchdog.c b/arch/arm/src/c5471/c5471_watchdog.c index 51363ec8df1..0329d7057c7 100644 --- a/arch/arm/src/c5471/c5471_watchdog.c +++ b/arch/arm/src/c5471/c5471_watchdog.c @@ -155,7 +155,7 @@ static inline unsigned int wdt_prescaletoptv(unsigned int prescale) } } - _err("prescale=%d -> ptv=%d\n", prescale, ptv); + wdinfo("prescale=%d -> ptv=%d\n", prescale, ptv); return ptv; } @@ -173,7 +173,7 @@ static int wdt_setusec(uint32_t usec) uint32_t divisor = 1; uint32_t mode; - _err("usec=%d\n", usec); + wdinfo("usec=%d\n", usec); /* Calculate a value of prescaler and divisor that will be able * to count to the usec. It may not be exact or the best @@ -186,7 +186,7 @@ static int wdt_setusec(uint32_t usec) do { divisor = (CLOCK_MHZx2 * usec) / (prescaler * 2); - _err("divisor=0x%x prescaler=0x%x\n", divisor, prescaler); + wdinfo("divisor=0x%x prescaler=0x%x\n", divisor, prescaler); if (divisor >= 0x10000) { @@ -194,7 +194,7 @@ static int wdt_setusec(uint32_t usec) { /* This is the max possible ~2.5 seconds. */ - _err("prescaler=0x%x too big!\n", prescaler); + wderr("ERROR: prescaler=0x%x too big!\n", prescaler); return ERROR; } @@ -207,19 +207,19 @@ static int wdt_setusec(uint32_t usec) } while (divisor >= 0x10000); - _err("prescaler=0x%x divisor=0x%x\n", prescaler, divisor); + wdinfo("prescaler=0x%x divisor=0x%x\n", prescaler, divisor); mode = wdt_prescaletoptv(prescaler); mode &= ~C5471_TIMER_AUTORELOAD; /* One shot mode. */ mode |= divisor << 5; - _err("mode=0x%x\n", mode); + wdinfo("mode=0x%x\n", mode); c5471_wdt_cntl = mode; /* Now start the watchdog */ c5471_wdt_cntl |= C5471_TIMER_STARTBIT; - _err("cntl_timer=0x%x\n", c5471_wdt_cntl); + wdinfo("cntl_timer=0x%x\n", c5471_wdt_cntl); return 0; } @@ -234,17 +234,17 @@ static int wdt_setusec(uint32_t usec) static int wdt_interrupt(int irq, void *context) { - _err("expired\n"); + wdllinfo("expired\n"); #if defined(CONFIG_SOFTWARE_REBOOT) # if defined(CONFIG_SOFTWARE_TEST) - _err(" Test only\n"); + wdllinfo(" Test only\n"); # else - _err(" Re-booting\n"); + wdllinfo(" Re-booting\n"); # warning "Add logic to reset CPU here" # endif #else - _err(" No reboot\n"); + wdllinfo(" No reboot\n"); #endif return OK; } @@ -259,7 +259,7 @@ static ssize_t wdt_read(struct file *filep, char *buffer, size_t buflen) * not work if the user provides a buffer smaller than 18 bytes. */ - _err("buflen=%d\n", buflen); + wdinfo("buflen=%d\n", buflen); if (buflen >= 18) { sprintf(buffer, "%08x %08x\n", c5471_wdt_cntl, c5471_wdt_count); @@ -274,7 +274,7 @@ static ssize_t wdt_read(struct file *filep, char *buffer, size_t buflen) static ssize_t wdt_write(struct file *filep, const char *buffer, size_t buflen) { - _err("buflen=%d\n", buflen); + wdinfo("buflen=%d\n", buflen); if (buflen) { /* Reset the timer to the maximum delay */ @@ -292,7 +292,7 @@ static ssize_t wdt_write(struct file *filep, const char *buffer, size_t buflen) static int wdt_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { - _err("ioctl Call: cmd=0x%x arg=0x%x", cmd, arg); + wdinfo("ioctl Call: cmd=0x%x arg=0x%x", cmd, arg); /* Process the IOCTL command (see arch/watchdog.h) */ @@ -315,8 +315,6 @@ static int wdt_ioctl(FAR struct file *filep, int cmd, unsigned long arg) static int wdt_open(struct file *filep) { - _err(""); - if (g_wdtopen) { return -EBUSY; @@ -339,11 +337,8 @@ static int wdt_open(struct file *filep) static int wdt_close(struct file *filep) { - _err(""); - /* The task controlling the watchdog has terminated. Take the timer - * the - * watchdog in interrupt mode -- we are going to reset unless the + * the watchdog in interrupt mode -- we are going to reset unless the * reopened again soon. */ @@ -367,7 +362,7 @@ int up_wdtinit(void) { int ret; - _err("C547x Watchdog Driver\n"); + wdinfo("C547x Watchdog Driver\n"); /* Register as /dev/wdt */ @@ -379,7 +374,7 @@ int up_wdtinit(void) /* Register for an interrupt level callback through wdt_interrupt */ - _err("Attach to IRQ=%d\n", C5471_IRQ_WATCHDOG); + wdinfo("Attach to IRQ=%d\n", C5471_IRQ_WATCHDOG); /* Make sure that the timer is stopped */ diff --git a/arch/arm/src/calypso/calypso_spi.c b/arch/arm/src/calypso/calypso_spi.c index 6278c32707b..36727927c43 100644 --- a/arch/arm/src/calypso/calypso_spi.c +++ b/arch/arm/src/calypso/calypso_spi.c @@ -216,8 +216,8 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din) tmp <<= (32-bitlen); /* align to MSB */ } - _err("spi_xfer(dev_idx=%u, bitlen=%u, data_out=0x%08x): ", - dev_idx, bitlen, tmp); + spiinfo("spi_xfer(dev_idx=%u, bitlen=%u, data_out=0x%08x): ", + dev_idx, bitlen, tmp); /* fill transmit registers */ @@ -236,14 +236,14 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din) } putreg16(reg_ctrl, SPI_REG(REG_CTRL)); - _err("reg_ctrl=0x%04x ", reg_ctrl); + spiinfo("reg_ctrl=0x%04x ", reg_ctrl); /* wait until the transfer is complete */ while (1) { reg_status = getreg16(SPI_REG(REG_STATUS)); - _err("status=0x%04x ", reg_status); + spiinfo("status=0x%04x ", reg_status); if (din && (reg_status & SPI_STATUS_RE)) { break; @@ -262,7 +262,7 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din) { tmp = getreg16(SPI_REG(REG_RX_MSB)) << 16; tmp |= getreg16(SPI_REG(REG_RX_LSB)); - _err("data_in=0x%08x ", tmp); + spiinfo("data_in=0x%08x ", tmp); if (bitlen <= 8) { @@ -278,7 +278,7 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din) } } - _err("\n"); + spiinfo("\n"); return 0; } diff --git a/arch/arm/src/calypso/calypso_uwire.c b/arch/arm/src/calypso/calypso_uwire.c index 7ad9075b1e4..fe2c33b7cc1 100644 --- a/arch/arm/src/calypso/calypso_uwire.c +++ b/arch/arm/src/calypso/calypso_uwire.c @@ -112,7 +112,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din) /* FIXME uwire_init always selects CS0 for now */ - _err("uwire_xfer(dev_idx=%u, bitlen=%u\n", cs, bitlen); + _info("uwire_xfer(dev_idx=%u, bitlen=%u\n", cs, bitlen); /* select the chip */ @@ -128,7 +128,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din) tmp <<= 16 - bitlen; /* align to MSB */ putreg16(tmp, UWIRE_REG(REG_DATA)); - _err(", data_out=0x%04hx", tmp); + _info(", data_out=0x%04hx", tmp); } tmp = (dout ? UWIRE_CSR_BITS_WR(bitlen) : 0) | @@ -142,7 +142,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din) _uwire_wait(UWIRE_CSR_RDRB, UWIRE_CSR_RDRB); tmp = getreg16(UWIRE_REG(REG_DATA)); - _err(", data_in=0x%08x", tmp); + _info(", data_in=0x%08x", tmp); if (bitlen <= 8) *(uint8_t *)din = tmp & 0xff; @@ -155,7 +155,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din) putreg16(UWIRE_CSR_IDX(0) | 0, UWIRE_REG(REG_CSR)); _uwire_wait(UWIRE_CSR_CSRB, 0); - _err(")\n"); + _info(")\n"); return 0; } diff --git a/arch/arm/src/common/up_exit.c b/arch/arm/src/common/up_exit.c index be084481fd9..4df8bf34631 100644 --- a/arch/arm/src/common/up_exit.c +++ b/arch/arm/src/common/up_exit.c @@ -52,6 +52,14 @@ #include "group/group.h" #include "up_internal.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -66,7 +74,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -77,8 +85,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) int i; #endif - serr(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); - serr(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); + sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); + sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); #if CONFIG_NFILE_DESCRIPTORS > 0 filelist = tcb->group->tg_filelist; @@ -87,8 +95,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) struct inode *inode = filelist->fl_files[i].f_inode; if (inode) { - serr(" fd=%d refcount=%d\n", - i, inode->i_crefs); + sinfo(" fd=%d refcount=%d\n", + i, inode->i_crefssinfo); } } #endif @@ -101,11 +109,11 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) if (filep->fs_fd >= 0) { #if CONFIG_STDIO_BUFFER_SIZE > 0 - serr(" fd=%d nbytes=%d\n", - filep->fs_fd, - filep->fs_bufpos - filep->fs_bufstart); + sinfo(" fd=%d nbytes=%d\n", + filep->fs_fd, + filep->fs_bufpos - filep->fs_bufstart); #else - serr(" fd=%d\n", filep->fs_fd); + sinfo(" fd=%d\n", filep->fs_fd); #endif } } @@ -138,10 +146,10 @@ void _exit(int status) (void)up_irq_save(); - sllerr("TCB=%p exiting\n", this_task()); + sllinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) - sllerr("Other tasks:\n"); +#ifdef CONFIG_DUMP_ON_EXIT + sllinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/arm/src/common/up_initialize.c b/arch/arm/src/common/up_initialize.c index 5316eacbb68..f926b7f0381 100644 --- a/arch/arm/src/common/up_initialize.c +++ b/arch/arm/src/common/up_initialize.c @@ -77,13 +77,13 @@ static void up_calibratedelay(void) { int i; - _llerr("Beginning 100s delay\n"); + _llwarn("Beginning 100s delay\n"); for (i = 0; i < 100; i++) { up_mdelay(1000); } - _llerr("End 100s delay\n"); + _llwarn("End 100s delay\n"); } #else # define up_calibratedelay() diff --git a/arch/arm/src/common/up_internal.h b/arch/arm/src/common/up_internal.h index 8dccf8a1ef0..af3da01e5e9 100644 --- a/arch/arm/src/common/up_internal.h +++ b/arch/arm/src/common/up_internal.h @@ -63,6 +63,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is * assumed. diff --git a/arch/avr/src/common/up_exit.c b/arch/avr/src/common/up_exit.c index 73dd3bb353b..4c164aa356a 100644 --- a/arch/avr/src/common/up_exit.c +++ b/arch/avr/src/common/up_exit.c @@ -52,6 +52,14 @@ #include "group/group.h" #include "up_internal.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -66,7 +74,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -140,7 +148,7 @@ void _exit(int status) sllinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT sllinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/avr/src/common/up_internal.h b/arch/avr/src/common/up_internal.h index 92a160ee90e..64eecb658ce 100644 --- a/arch/avr/src/common/up_internal.h +++ b/arch/avr/src/common/up_internal.h @@ -67,6 +67,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /* Check if an interrupt stack size is configured */ #ifndef CONFIG_ARCH_INTERRUPTSTACK diff --git a/arch/hc/src/common/up_exit.c b/arch/hc/src/common/up_exit.c index 251e91cefc4..34688b5a6d4 100644 --- a/arch/hc/src/common/up_exit.c +++ b/arch/hc/src/common/up_exit.c @@ -56,9 +56,9 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif /**************************************************************************** * Private Functions @@ -74,7 +74,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -148,7 +148,7 @@ void _exit(int status) sllinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT sllinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/hc/src/common/up_internal.h b/arch/hc/src/common/up_internal.h index 1650711f3a6..5550790df89 100644 --- a/arch/hc/src/common/up_internal.h +++ b/arch/hc/src/common/up_internal.h @@ -62,6 +62,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is * assumed. diff --git a/arch/mips/src/common/up_exit.c b/arch/mips/src/common/up_exit.c index d26de05841f..3a345a5d663 100644 --- a/arch/mips/src/common/up_exit.c +++ b/arch/mips/src/common/up_exit.c @@ -58,9 +58,9 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif /**************************************************************************** * Private Functions @@ -76,7 +76,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -150,7 +150,7 @@ void _exit(int status) sllinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT sllinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/mips/src/common/up_internal.h b/arch/mips/src/common/up_internal.h index 3b2ca4ccbc3..f48726606b7 100644 --- a/arch/mips/src/common/up_internal.h +++ b/arch/mips/src/common/up_internal.h @@ -60,6 +60,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is * assumed. diff --git a/arch/sh/src/common/up_exit.c b/arch/sh/src/common/up_exit.c index 4b4ba44337c..ddeeecd3aa8 100644 --- a/arch/sh/src/common/up_exit.c +++ b/arch/sh/src/common/up_exit.c @@ -57,9 +57,9 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif /**************************************************************************** * Private Functions @@ -75,7 +75,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -149,7 +149,7 @@ void _exit(int status) sllinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT sllinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/x86/src/common/up_exit.c b/arch/x86/src/common/up_exit.c index 7e96c48e882..94f982ade02 100644 --- a/arch/x86/src/common/up_exit.c +++ b/arch/x86/src/common/up_exit.c @@ -56,9 +56,9 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif /**************************************************************************** * Private Functions @@ -74,7 +74,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -148,7 +148,7 @@ void _exit(int status) sllinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT sllinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/x86/src/common/up_internal.h b/arch/x86/src/common/up_internal.h index d0eb1570c36..2af49eda982 100644 --- a/arch/x86/src/common/up_internal.h +++ b/arch/x86/src/common/up_internal.h @@ -62,6 +62,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is * assumed. diff --git a/arch/z16/src/common/up_exit.c b/arch/z16/src/common/up_exit.c index df4d62c3818..1b20e271e55 100644 --- a/arch/z16/src/common/up_exit.c +++ b/arch/z16/src/common/up_exit.c @@ -53,6 +53,14 @@ #include "sched/sched.h" #include "up_internal.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -67,7 +75,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -141,7 +149,7 @@ void _exit(int status) sllinfo("TCB=%p exiting\n", tcb); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT sllinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/z16/src/common/up_internal.h b/arch/z16/src/common/up_internal.h index 64a5302a420..8203600b79f 100644 --- a/arch/z16/src/common/up_internal.h +++ b/arch/z16/src/common/up_internal.h @@ -60,6 +60,10 @@ #undef CONFIG_Z16_LOWPUTC /* Support up_lowputc for debug */ #undef CONFIG_Z16_LOWGETC /* support z16_lowgetc for debug */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is * assumed. diff --git a/arch/z80/src/common/up_exit.c b/arch/z80/src/common/up_exit.c index a5e98321334..7a8fd8a8367 100644 --- a/arch/z80/src/common/up_exit.c +++ b/arch/z80/src/common/up_exit.c @@ -59,9 +59,9 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif /**************************************************************************** * Private Functions @@ -77,7 +77,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -88,8 +88,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) int i; #endif - _llinfo(" TCB=%p name=%s\n", tcb, tcb->argv[0]); - _llinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); + sllinfo(" TCB=%p name=%s\n", tcb, tcb->argv[0]); + sllinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); #if CONFIG_NFILE_DESCRIPTORS > 0 filelist = tcb->group->tg_filelist; @@ -98,7 +98,7 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) struct inode *inode = filelist->fl_files[i].f_inode; if (inode) { - _llinfo(" fd=%d refcount=%d\n", + sllinfo(" fd=%d refcount=%d\n", i, inode->i_crefs); } } @@ -112,11 +112,11 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) if (filep->fs_fd >= 0) { #if CONFIG_STDIO_BUFFER_SIZE > 0 - _llinfo(" fd=%d nbytes=%d\n", + sllinfo(" fd=%d nbytes=%d\n", filep->fs_fd, filep->fs_bufpos - filep->fs_bufstart); #else - _llinfo(" fd=%d\n", filep->fs_fd); + sllinfo(" fd=%d\n", filep->fs_fd); #endif } } @@ -151,8 +151,8 @@ void _exit(int status) sllinfo("TCB=%p exiting\n", tcb); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES) - _llinfo("Other tasks:\n"); +#ifdef CONFIG_DUMP_ON_EXIT + sllinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/z80/src/common/up_internal.h b/arch/z80/src/common/up_internal.h index 76deaa34b7b..51bb7acf5f0 100644 --- a/arch/z80/src/common/up_internal.h +++ b/arch/z80/src/common/up_internal.h @@ -51,6 +51,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /**************************************************************************** * Included Files ****************************************************************************/