Common/Calypso/C5471: Convert *err() to either *info() or add ERROR:, depending on if an error is reported
This commit is contained in:
parent
a56812a335
commit
ac18dc27ca
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
****************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user