1
0
Fork 0
forked from nuttx/nuttx-update

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 2d9b57758b
commit b72a7ab50b
82 changed files with 328 additions and 278 deletions

View file

@ -247,4 +247,4 @@
0.3.3 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
* Removed unused uIP files
* sched/, mm/, net/ subystem debug can not be selectively enabled/disabled

View file

@ -727,6 +727,7 @@ Other memory:
0.3.3 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
* Removed unused uIP files
* sched/, mm/, net/ subystem debug can not be selectively enabled/disabled
</pre></ul>
<table width ="100%">

View file

@ -1196,6 +1196,15 @@ The system can be re-made subsequently by just typing <code>make</code>.
<li>
<code>CONFIG_DEBUG</code>: enables built-in debug options
</li>
<li>
<code>CONFIG_DEBUG_SCHED</code>: enable OS debug output (disabled by default)
</li>
<li>
<code>CONFIG_DEBUG_MM</code>: enable memory management debug output (disabld by default)
</li>
<li>
<code>CONFIG_DEBUG_NET</code>: enable networkd debug output (disabled by default)
</li>
<li>
<code>CONFIG_DEBUG_VERBOSE</code>: enables verbose debug output
</li>

2
TODO
View file

@ -33,7 +33,7 @@ o Network
but is not implemented.
- uIP's netutils/telnetd (and maybe others) are seriously broken.
Need to be re-written to use listen() and accept()
- uIP's netutils/webserver hangs
- uIP's netutils/webserver hangs (I think NuttX is not properly closing the connection)
- uIP's netutils/smtp, dpcpc, resolv, webclient -- untested
- Should implement SOCK_RAW
- Performance Improvements (uIP is not very fast):

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;
}

View file

@ -126,6 +126,12 @@ defconfig -- This is a configuration file similar to the Linux
that will be used in the build
CONFIG_DEBUG - enables built-in debug options
CONFIG_DEBUG_VERBOSE - enables verbose debug output
CONFIG_DEBUG_SCHED - enable OS debug output (disabled by
default)
CONFIG_DEBUG_MM - enable memory management debug output
(disabld by default)
CONFIG_DEBUG_NET - enable network debug output (disabled
by default)
CONFIG_HAVE_LOWPUTC - architecture supports low-level, boot
time console output
CONFIG_MM_REGIONS - If the architecture includes multiple

View file

@ -452,7 +452,7 @@ static void putreg(int reg, uint8 value)
static void read8(uint8 *ptr, int len)
{
vdbg("Read %d bytes (8-bit mode)\n", len);
nvdbg("Read %d bytes (8-bit mode)\n", len);
for (; len > 0; len--)
{
*ptr++ = DM9X_DATA;
@ -462,7 +462,7 @@ static void read8(uint8 *ptr, int len)
static void read16(uint8 *ptr, int len)
{
register uint16 *ptr16 = (uint16*)ptr;
vdbg("Read %d bytes (16-bit mode)\n", len);
nvdbg("Read %d bytes (16-bit mode)\n", len);
for (; len > 0; len -= sizeof(uint16))
{
*ptr16++ = DM9X_DATA;
@ -472,7 +472,7 @@ static void read16(uint8 *ptr, int len)
static void read32(uint8 *ptr, int len)
{
register uint32 *ptr32 = (uint32*)ptr;
vdbg("Read %d bytes (32-bit mode)\n", len);
nvdbg("Read %d bytes (32-bit mode)\n", len);
for (; len > 0; len -= sizeof(uint32))
{
*ptr32++ = DM9X_DATA;
@ -498,7 +498,7 @@ static void read32(uint8 *ptr, int len)
static void discard8(int len)
{
vdbg("Discard %d bytes (8-bit mode)\n", len);
nvdbg("Discard %d bytes (8-bit mode)\n", len);
for (; len > 0; len--)
{
DM9X_DATA;
@ -507,7 +507,7 @@ static void discard8(int len)
static void discard16(int len)
{
vdbg("Discard %d bytes (16-bit mode)\n", len);
nvdbg("Discard %d bytes (16-bit mode)\n", len);
for (; len > 0; len -= sizeof(uint16))
{
DM9X_DATA;
@ -516,7 +516,7 @@ static void discard16(int len)
static void discard32(int len)
{
vdbg("Discard %d bytes (32-bit mode)\n", len);
nvdbg("Discard %d bytes (32-bit mode)\n", len);
for (; len > 0; len -= sizeof(uint32))
{
DM9X_DATA;
@ -542,7 +542,7 @@ static void discard32(int len)
static void write8(const uint8 *ptr, int len)
{
vdbg("Write %d bytes (8-bit mode)\n", len);
nvdbg("Write %d bytes (8-bit mode)\n", len);
for (; len > 0; len--)
{
DM9X_DATA = (*ptr++ & 0xff);
@ -552,7 +552,7 @@ static void write8(const uint8 *ptr, int len)
static void write16(const uint8 *ptr, int len)
{
register uint16 *ptr16 = (uint16*)ptr;
vdbg("Write %d bytes (16-bit mode)\n", len);
nvdbg("Write %d bytes (16-bit mode)\n", len);
for (; len > 0; len -= sizeof(uint16))
{
@ -563,7 +563,7 @@ static void write16(const uint8 *ptr, int len)
static void write32(const uint8 *ptr, int len)
{
register uint32 *ptr32 = (uint32*)ptr;
vdbg("Write %d bytes (32-bit mode)\n", len);
nvdbg("Write %d bytes (32-bit mode)\n", len);
for (; len > 0; len -= sizeof(uint32))
{
DM9X_DATA = *ptr32++;
@ -703,17 +703,17 @@ static void dm9x_resetstatistics(struct dm9x_driver_s *dm9x)
#if defined(CONFIG_DM9X_STATS) && defined(CONFIG_DEBUG)
static void dm9x_dumpstatistics(struct dm9x_driver_s *dm9x)
{
dbg("TX packets: %d\n", dm9x->dm_ntxpackets);
dbg(" bytes: %d\n", dm9x->dm_ntxbytes);
dbg(" errors: %d\n", dm9x->dm_ntxerrors);
dbg("RX packets: %d\n", dm9x->dm_nrxpackets);
dbg(" bytes: %d\n", dm9x->dm_nrxbytes);
dbg(" FIFO overflows: %d\n", dm9x->dm_nrxfifoerrors);
dbg(" CRC errors: %d\n", dm9x->dm_nrxcrcerrors);
dbg(" length errors: %d\n", dm9x->dm_nrxlengtherrors);
dbg("Physical layer errors: %d\n", dm9x->dm_nphyserrors);
dbg("Resets: %d\n", dm9x->dm_nresets);
dbg("TX timeout resets: %d\n", dm9x->dm_ntxtimeouts);
ndbg("TX packets: %d\n", dm9x->dm_ntxpackets);
ndbg(" bytes: %d\n", dm9x->dm_ntxbytes);
ndbg(" errors: %d\n", dm9x->dm_ntxerrors);
ndbg("RX packets: %d\n", dm9x->dm_nrxpackets);
ndbg(" bytes: %d\n", dm9x->dm_nrxbytes);
ndbg(" FIFO overflows: %d\n", dm9x->dm_nrxfifoerrors);
ndbg(" CRC errors: %d\n", dm9x->dm_nrxcrcerrors);
ndbg(" length errors: %d\n", dm9x->dm_nrxlengtherrors);
ndbg("Physical layer errors: %d\n", dm9x->dm_nphyserrors);
ndbg("Resets: %d\n", dm9x->dm_nresets);
ndbg("TX timeout resets: %d\n", dm9x->dm_ntxtimeouts);
}
#endif
@ -891,7 +891,7 @@ static void dm9x_receive(struct dm9x_driver_s *dm9x)
uint8 mdral;
uint8 rxbyte;
vdbg("Packet received\n");
nvdbg("Packet received\n");
do
{
@ -929,28 +929,28 @@ static void dm9x_receive(struct dm9x_driver_s *dm9x)
if (rx.desc.rx_status & 0x01)
{
dm9x->dm_nrxfifoerrors++;
dbg("RX FIFO error: %d\n", dm9x->dm_nrxfifoerrors);
ndbg("RX FIFO error: %d\n", dm9x->dm_nrxfifoerrors);
}
if (rx.desc.rx_status & 0x02)
{
dm9x->dm_nrxcrcerrors++;
dbg("RX CRC error: %d\n", dm9x->dm_nrxcrcerrors);
ndbg("RX CRC error: %d\n", dm9x->dm_nrxcrcerrors);
}
if (rx.desc.rx_status & 0x80)
{
dm9x->dm_nrxlengtherrors++;
dbg("RX length error: %d\n", dm9x->dm_nrxlengtherrors);
ndbg("RX length error: %d\n", dm9x->dm_nrxlengtherrors);
}
if (rx.desc.rx_status & 0x08)
{
dm9x->dm_nphyserrors++;
dbg("Physical Layer error: %d\n", dm9x->dm_nphyserrors);
ndbg("Physical Layer error: %d\n", dm9x->dm_nphyserrors);
}
#else
dbg("Received packet with errors: %02x\n", rx.desc.rx_status);
ndbg("Received packet with errors: %02x\n", rx.desc.rx_status);
#endif
/* Drop this packet and continue to check the next packet */
@ -963,7 +963,7 @@ static void dm9x_receive(struct dm9x_driver_s *dm9x)
{
#if defined(CONFIG_DM9X_STATS)
dm9x->dm_nrxlengtherrors++;
dbg("RX length error: %d\n", dm9x->dm_nrxlengtherrors);
ndbg("RX length error: %d\n", dm9x->dm_nrxlengtherrors);
#endif
/* Drop this packet and continue to check the next packet */
@ -1019,7 +1019,7 @@ static void dm9x_receive(struct dm9x_driver_s *dm9x)
dm9x->ncrxpackets++;
}
while ((rxbyte & 0x01) == DM9X_PKTRDY && dm9x->ncrxpackets < DM9X_CRXTHRES);
vdbg("All RX packets processed\n");
nvdbg("All RX packets processed\n");
}
/****************************************************************************
@ -1042,7 +1042,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x)
{
int nsr;
vdbg("TX done\n");
nvdbg("TX done\n");
/* Another packet has completed transmission. Decrement the count of
* of pending TX transmissions.
@ -1057,7 +1057,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x)
}
else
{
dbg("Bad TX count (TX1END)\n");
ndbg("Bad TX count (TX1END)\n");
}
}
@ -1069,7 +1069,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x)
}
else
{
dbg("Bad TX count (TX2END)\n");
ndbg("Bad TX count (TX2END)\n");
}
}
@ -1121,7 +1121,7 @@ static int dm9x_interrupt(int irq, FAR void *context)
isr = getreg(DM9X_ISR);
putreg(DM9X_ISR, isr);
vdbg("Interrupt status: %02x\n", isr);
nvdbg("Interrupt status: %02x\n", isr);
/* Check for link status change */
@ -1155,7 +1155,7 @@ static int dm9x_interrupt(int irq, FAR void *context)
}
up_mdelay(1);
}
dbg("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
ndbg("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
}
/* Check if we received an incoming packet */
@ -1217,7 +1217,7 @@ static void dm9x_txtimeout(int argc, uint32 arg, ...)
{
struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)arg;
dbg("TX timeout\n");
ndbg("TX timeout\n");
/* Increment statistics and dump debug info */
@ -1226,14 +1226,14 @@ static void dm9x_txtimeout(int argc, uint32 arg, ...)
dm9x->dm_ntxerrors++;
#endif
dbg(" TX packet count: %d\n", dm9x->dm_ntxpending);
ndbg(" TX packet count: %d\n", dm9x->dm_ntxpending);
#if defined(CONFIG_DM9X_STATS)
dbg(" TX timeouts: %d\n", dm9x->dm_ntxtimeouts);
ndbg(" TX timeouts: %d\n", dm9x->dm_ntxtimeouts);
#endif
dbg(" TX read pointer address: 0x%02x:%02x\n",
getreg(DM9X_TRPAH), getreg(DM9X_TRPAL));
dbg(" Memory data write address: 0x%02x:%02x (DM9010)\n",
getreg(DM9X_MDWAH), getreg(DM9X_MDWAL));
ndbg(" TX read pointer address: 0x%02x:%02x\n",
getreg(DM9X_TRPAH), getreg(DM9X_TRPAL));
ndbg(" Memory data write address: 0x%02x:%02x (DM9010)\n",
getreg(DM9X_MDWAH), getreg(DM9X_MDWAL));
/* Then reset the DM90x0 */
@ -1358,7 +1358,7 @@ static int dm9x_ifup(struct uip_driver_s *dev)
uint8 netstatus;
int i;
dbg("Bringing up: %d.%d.%d.%d\n",
ndbg("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 );
@ -1388,7 +1388,7 @@ static int dm9x_ifup(struct uip_driver_s *dev)
up_mdelay(1);
}
dbg("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
ndbg("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
/* Set and activate a timer process */
@ -1421,7 +1421,7 @@ static int dm9x_ifdown(struct uip_driver_s *dev)
struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private;
irqstate_t flags;
dbg("Stopping\n");
ndbg("Stopping\n");
/* Disable the DM9X interrupt */
@ -1472,7 +1472,7 @@ static int dm9x_txavail(struct uip_driver_s *dev)
struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private;
irqstate_t flags;
dbg("Polling\n");
ndbg("Polling\n");
flags = irqsave();
/* Check if there is room in the DM90x0 to hold another packet. In 100M mode,
@ -1486,6 +1486,7 @@ static int dm9x_txavail(struct uip_driver_s *dev)
(void)uip_poll(&dm9x->dm_dev, dm9x_uiptxpoll);
}
irqrestore(flags);
return OK;
}
/****************************************************************************
@ -1506,7 +1507,7 @@ static int dm9x_txavail(struct uip_driver_s *dev)
static void dm9x_bringup(struct dm9x_driver_s *dm9x)
{
dbg("Initializing\n");
ndbg("Initializing\n");
/* Set the internal PHY power-on, GPIOs normal, and wait 2ms */
@ -1675,13 +1676,13 @@ int dm9x_initialize(void)
vid = (((uint16)getreg(DM9X_VIDH)) << 8) | (uint16)getreg(DM9X_VIDL);
pid = (((uint16)getreg(DM9X_PIDH)) << 8) | (uint16)getreg(DM9X_PIDL);
lldbg("I/O base: %08x VID: %04x PID: %04x\n", CONFIG_DM9X_BASE, vid, pid);
nlldbg("I/O base: %08x VID: %04x PID: %04x\n", CONFIG_DM9X_BASE, vid, pid);
/* Check if a DM90x0 chip is recognized at this I/O base */
if (vid != DM9X_DAVICOMVID || (pid != DM9X_DM9000PID && pid != DM9X_DM9010PID))
{
lldbg("DM90x0 vender/product ID not found at this base address\n");
nlldbg("DM90x0 vender/product ID not found at this base address\n");
return -ENODEV;
}
@ -1691,7 +1692,7 @@ int dm9x_initialize(void)
{
/* We could not attach the ISR to the ISR */
lldbg("irq_attach() failed\n");
nlldbg("irq_attach() failed\n");
return -EAGAIN;
}
@ -1716,8 +1717,8 @@ int dm9x_initialize(void)
mptr[i] = getreg(j);
}
lldbg("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n",
mptr[0], mptr[1], mptr[2], mptr[3], mptr[4], mptr[5]);
nlldbg("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n",
mptr[0], mptr[1], mptr[2], mptr[3], mptr[4], mptr[5]);
/* Register the device with the OS so that socket IOCTLs can be performed */

View file

@ -209,7 +209,7 @@ static void show_variable(const char *var_name, const char *exptd_value, boolean
}
}
static show_environment(boolean var1_valid, boolean var2_valid, boolean var3_valid)
static void show_environment(boolean var1_valid, boolean var2_valid, boolean var3_valid)
{
show_variable( g_var1_name, g_var1_value, var1_valid);
show_variable( g_var2_name, g_var2_value, var2_valid);

View file

@ -83,7 +83,7 @@ void recv_server(void)
{
struct sockaddr_in server;
struct sockaddr_in client;
uint32 tmpaddr;
in_addr_t tmpaddr;
unsigned char inbuf[1024];
int sockfd;
int nbytes;

View file

@ -126,7 +126,7 @@ int stat(const char *path, FAR struct stat *buf)
{
FAR struct inode *inode;
const char *relpath = NULL;
int ret;
int ret = OK;
/* Sanity checks */

View file

@ -90,7 +90,7 @@ int statfs(const char *path, struct statfs *buf)
{
FAR struct inode *inode;
const char *relpath = NULL;
int ret;
int ret = OK;
/* Sanity checks */

View file

@ -80,6 +80,38 @@
# define vdbg(x...)
#endif
/* Subsystem specific debug */
#ifdef CONFIG_DEBUG_MM
# define mdbg(format, arg...) dbg(format, ##arg)
# define mlldbg(format, arg...) lldbg(format, ##arg)
# define mvdbg(format, arg...) vdbg(format, ##arg)
#else
# define mdbg(x...)
# define mlldbg(x...)
# define mvdbg(x...)
#endif
#ifdef CONFIG_DEBUG_SCHED
# define sdbg(format, arg...) dbg(format, ##arg)
# define slldbg(format, arg...) lldbg(format, ##arg)
# define svdbg(format, arg...) vdbg(format, ##arg)
#else
# define sdbg(x...)
# define slldbg(x...)
# define svdbg(x...)
#endif
#ifdef CONFIG_DEBUG_NET
# define ndbg(format, arg...) dbg(format, ##arg)
# define nlldbg(format, arg...) lldbg(format, ##arg)
# define nvdbg(format, arg...) vdbg(format, ##arg)
#else
# define ndbg(x...)
# define nlldbg(x...)
# define nvdbg(x...)
#endif
/************************************************************
* Public Type Declarations
************************************************************/

View file

@ -107,10 +107,10 @@ extern void mm_addregion(FAR void *heapstart, size_t heapsize);
# define CONFIG_DEBUG
# undef dbg
# define dbg(format, arg...) printf(format, ##arg)
# undef vdg
# define vdbg(format, arg...) printf(format, ##arg)
# undef mdbg
# define mdbg(format, arg...) printf(format, ##arg)
# undef mvdg
# define mvdbg(format, arg...) printf(format, ##arg)
#else
# define mm_errno (*get_errno_ptr())

View file

@ -68,7 +68,7 @@ void free(FAR void *mem)
FAR struct mm_freenode_s *prev;
FAR struct mm_freenode_s *next;
vdbg("Freeing %p\n", mem);
mvdbg("Freeing %p\n", mem);
/* Protect against attempts to free a NULL reference */

View file

@ -162,7 +162,7 @@ void mm_addregion(FAR void *heapstart, size_t heapsize)
heapend = MM_ALIGN_DOWN((size_t)heapstart + (size_t)heapsize);
heapsize = heapend - heapbase;
lldbg("Region %d: base=%p size=%d\n", IDX+1, heapstart, heapsize);
mlldbg("Region %d: base=%p size=%d\n", IDX+1, heapstart, heapsize);
/* Add the size of this region to the total size of the heap */

View file

@ -199,6 +199,6 @@ FAR void *malloc(size_t size)
}
mm_givesemaphore();
vdbg("Allocated %p\n", ret);
mvdbg("Allocated %p\n", ret);
return ret;
}

View file

@ -110,7 +110,7 @@ static void connection_event(struct uip_conn *conn, uint8 flags)
if (psock)
{
vdbg("flags: %02x s_flags: %02x\n", flags, psock->s_flags);
nvdbg("flags: %02x s_flags: %02x\n", flags, psock->s_flags);
/* UIP_CLOSE: The remote host has closed the connection
* UIP_ABORT: The remote host has aborted the connection
@ -207,7 +207,7 @@ static uint8 tcp_connect_interrupt(struct uip_driver_s *dev,
{
struct tcp_connect_s *pstate = (struct tcp_connect_s *)conn->data_private;
vdbg("flags: %02x\n", flags);
nvdbg("flags: %02x\n", flags);
/* 'private' might be null in some race conditions (?) */
@ -260,7 +260,7 @@ static uint8 tcp_connect_interrupt(struct uip_driver_s *dev,
return 0;
}
vdbg("Resuming: %d\n", pstate->tc_result);
nvdbg("Resuming: %d\n", pstate->tc_result);
/* Stop further callbacks */

View file

@ -141,10 +141,10 @@ int netdev_register(FAR struct uip_driver_s *dev)
g_netdevices = dev;
netdev_semgive();
lldbg("Registered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n",
dev->d_mac.addr[0], dev->d_mac.addr[1], dev->d_mac.addr[2],
dev->d_mac.addr[3], dev->d_mac.addr[4], dev->d_mac.addr[5],
dev->d_ifname);
nlldbg("Registered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n",
dev->d_mac.addr[0], dev->d_mac.addr[1], dev->d_mac.addr[2],
dev->d_mac.addr[3], dev->d_mac.addr[4], dev->d_mac.addr[5],
dev->d_ifname);
return OK;
}

View file

@ -127,7 +127,7 @@ static void recvfrom_newdata(struct uip_driver_s *dev, struct recvfrom_s *pstate
/* Copy the new appdata into the user buffer */
memcpy(pstate->rf_buffer, dev->d_appdata, recvlen);
vdbg("Received %d bytes (of %d)\n", recvlen, dev->d_len);
nvdbg("Received %d bytes (of %d)\n", recvlen, dev->d_len);
/* Update the accumulated size of the data read */
@ -197,7 +197,7 @@ static inline void recvfrom_readahead(struct recvfrom_s *pstate)
/* Copy the read-ahead data into the user buffer */
memcpy(pstate->rf_buffer, readahead->rh_buffer, recvlen);
vdbg("Received %d bytes (of %d)\n", recvlen, readahead->rh_nbytes);
nvdbg("Received %d bytes (of %d)\n", recvlen, readahead->rh_nbytes);
/* Update the accumulated size of the data read */
@ -361,7 +361,7 @@ static uint8 recvfrom_tcpinterrupt(struct uip_driver_s *dev,
{
struct recvfrom_s *pstate = (struct recvfrom_s *)conn->data_private;
vdbg("flags: %02x\n", flags);
nvdbg("flags: %02x\n", flags);
/* 'private' might be null in some race conditions (?) */
@ -383,7 +383,7 @@ static uint8 recvfrom_tcpinterrupt(struct uip_driver_s *dev,
if (pstate->rf_buflen == 0)
{
vdbg("TCP resume\n");
nvdbg("TCP resume\n");
/* The TCP receive buffer is full. Return now, perhaps truncating
* the received data (need to fix that).
@ -414,7 +414,7 @@ static uint8 recvfrom_tcpinterrupt(struct uip_driver_s *dev,
else if ((flags & (UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT)) != 0)
{
vdbg("error\n");
nvdbg("error\n");
/* Stop further callbacks */
@ -441,7 +441,7 @@ static uint8 recvfrom_tcpinterrupt(struct uip_driver_s *dev,
* callbacks
*/
vdbg("TCP timeout\n");
nvdbg("TCP timeout\n");
conn->data_private = NULL;
conn->data_event = NULL;
@ -535,7 +535,7 @@ static void recvfrom_udpinterrupt(struct uip_driver_s *dev,
{
struct recvfrom_s *pstate = (struct recvfrom_s *)conn->private;
vdbg("flags: %02x\n", flags);
nvdbg("flags: %02x\n", flags);
/* 'private' might be null in some race conditions (?) */
@ -551,7 +551,7 @@ static void recvfrom_udpinterrupt(struct uip_driver_s *dev,
/* We are finished. */
vdbg("UDP done\n");
nvdbg("UDP done\n");
/* Don't allow any further UDP call backs. */
@ -573,7 +573,7 @@ static void recvfrom_udpinterrupt(struct uip_driver_s *dev,
else if ((flags & (UIP_CLOSE|UIP_ABORT|UIP_TIMEDOUT)) != 0)
{
vdbg("error\n");
nvdbg("error\n");
/* Stop further callbacks */
@ -600,7 +600,7 @@ static void recvfrom_udpinterrupt(struct uip_driver_s *dev,
* callbacks
*/
vdbg("UDP timeout\n");
nvdbg("UDP timeout\n");
/* Stop further callbacks */

View file

@ -104,7 +104,7 @@ static uint8 send_interrupt(struct uip_driver_s *dev, struct uip_conn *conn, uin
{
struct send_s *pstate = (struct send_s *)conn->data_private;
vdbg("flags: %02x state: %d\n", flags, pstate->snd_state);
nvdbg("flags: %02x state: %d\n", flags, pstate->snd_state);
/* If the data has not been sent OR if it needs to be retransmitted,
* then send it now.

View file

@ -140,20 +140,20 @@ static uint8 g_arptime;
#if defined(CONFIG_NET_DUMPARP) && defined(CONFIG_DEBUG)
static void uip_arp_dump(struct arp_hdr *arp)
{
dbg(" HW type: %04x Protocol: %04x\n",
arp->ah_hwtype, arp->ah_protocol);\
dbg(" HW len: %02x Proto len: %02x Operation: %04x\n",
arp->ah_hwlen, arp->ah_protolen, arp->ah_opcode);
dbg(" Sender MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n",
arp->ah_shwaddr[0], arp->ah_shwaddr[1], arp->ah_shwaddr[2],
arp->ah_shwaddr[3], arp->ah_shwaddr[4], arp->ah_shwaddr[5],
arp->ah_sipaddr[0] & 0xff, arp->ah_sipaddr[0] >> 8,
arp->ah_sipaddr[1] & 0xff, arp->ah_sipaddr[1] >> 8);
dbg(" Dest MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n",
arp->ah_dhwaddr[0], arp->ah_dhwaddr[1], arp->ah_dhwaddr[2],
arp->ah_dhwaddr[3], arp->ah_dhwaddr[4], arp->ah_dhwaddr[5],
arp->ah_dipaddr[0] & 0xff, arp->ah_dipaddr[0] >> 8,
arp->ah_dipaddr[1] & 0xff, arp->ah_dipaddr[1] >> 8);
ndbg(" HW type: %04x Protocol: %04x\n",
arp->ah_hwtype, arp->ah_protocol);\
ndbg(" HW len: %02x Proto len: %02x Operation: %04x\n",
arp->ah_hwlen, arp->ah_protolen, arp->ah_opcode);
ndbg(" Sender MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n",
arp->ah_shwaddr[0], arp->ah_shwaddr[1], arp->ah_shwaddr[2],
arp->ah_shwaddr[3], arp->ah_shwaddr[4], arp->ah_shwaddr[5],
arp->ah_sipaddr[0] & 0xff, arp->ah_sipaddr[0] >> 8,
arp->ah_sipaddr[1] & 0xff, arp->ah_sipaddr[1] >> 8);
ndbg(" Dest MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n",
arp->ah_dhwaddr[0], arp->ah_dhwaddr[1], arp->ah_dhwaddr[2],
arp->ah_dhwaddr[3], arp->ah_dhwaddr[4], arp->ah_dhwaddr[5],
arp->ah_dipaddr[0] & 0xff, arp->ah_dipaddr[0] >> 8,
arp->ah_dipaddr[1] & 0xff, arp->ah_dipaddr[1] >> 8);
}
#else
# define uip_arp_dump(arp)

View file

@ -110,7 +110,7 @@ void uip_icmpinput(struct uip_driver_s *dev)
if (ICMPBUF->type != ICMP_ECHO)
{
dbg("Unknown ICMP cmd: %d\n", ICMPBUF->type);
ndbg("Unknown ICMP cmd: %d\n", ICMPBUF->type);
goto typeerr;
}
@ -142,8 +142,8 @@ void uip_icmpinput(struct uip_driver_s *dev)
uiphdr_ipaddr_copy(ICMPBUF->destipaddr, ICMPBUF->srcipaddr);
uiphdr_ipaddr_copy(ICMPBUF->srcipaddr, &dev->d_ipaddr);
vdbg("Outgoing ICMP packet length: %d (%d)\n",
dev->d_len, (ICMPBUF->len[0] << 8) | ICMPBUF->len[1]);
nvdbg("Outgoing ICMP packet length: %d (%d)\n",
dev->d_len, (ICMPBUF->len[0] << 8) | ICMPBUF->len[1]);
#ifdef CONFIG_NET_STATISTICS
uip_stat.icmp.sent++;
@ -213,12 +213,12 @@ typeerr:
}
else
{
dbg("Unknown ICMP6 cmd: %d\n", ICMPBUF->type);
ndbg("Unknown ICMP6 cmd: %d\n", ICMPBUF->type);
goto typeerr;
}
vdbg("Outgoing ICMP6 packet length: %d (%d)\n",
dev->d_len, (ICMPBUF->len[0] << 8) | ICMPBUF->len[1]);
nvdbg("Outgoing ICMP6 packet length: %d (%d)\n",
dev->d_len, (ICMPBUF->len[0] << 8) | ICMPBUF->len[1]);
#ifdef CONFIG_NET_STATISTICS
uip_stat.icmp.sent++;

View file

@ -313,7 +313,7 @@ void uip_input(struct uip_driver_s *dev)
uip_stat.ip.drop++;
uip_stat.ip.vhlerr++;
#endif
dbg("Invalid IPv6 version: %d\n", BUF->vtc >> 4);
ndbg("Invalid IPv6 version: %d\n", BUF->vtc >> 4);
goto drop;
}
#else /* CONFIG_NET_IPv6 */
@ -327,7 +327,7 @@ void uip_input(struct uip_driver_s *dev)
uip_stat.ip.drop++;
uip_stat.ip.vhlerr++;
#endif
dbg("Invalid IP version or header length: %02x\n", BUF->vhl);
ndbg("Invalid IP version or header length: %02x\n", BUF->vhl);
goto drop;
}
#endif /* CONFIG_NET_IPv6 */
@ -356,7 +356,7 @@ void uip_input(struct uip_driver_s *dev)
}
else
{
dbg("IP packet shorter than length in IP header\n");
ndbg("IP packet shorter than length in IP header\n");
goto drop;
}
@ -376,7 +376,7 @@ void uip_input(struct uip_driver_s *dev)
uip_stat.ip.drop++;
uip_stat.ip.fragerr++;
#endif
dbg("IP fragment dropped\n");
ndbg("IP fragment dropped\n");
goto drop;
#endif /* UIP_REASSEMBLY */
}
@ -392,14 +392,14 @@ void uip_input(struct uip_driver_s *dev)
#if defined(CONFIG_NET_PINGADDRCONF) && !defined(CONFIG_NET_IPv6)
if (BUF->proto == UIP_PROTO_ICMP)
{
dbg("Possible ping config packet received\n");
ndbg("Possible ping config packet received\n");
uip_icmpinput(dev);
goto done;
}
else
#endif
{
dbg("No IP address assigned\n");
ndbg("No IP address assigned\n");
goto drop;
}
}
@ -454,7 +454,7 @@ void uip_input(struct uip_driver_s *dev)
uip_stat.ip.drop++;
uip_stat.ip.chkerr++;
#endif
dbg("Bad IP checksum\n");
ndbg("Bad IP checksum\n");
goto drop;
}
#endif /* CONFIG_NET_IPv6 */
@ -495,7 +495,7 @@ void uip_input(struct uip_driver_s *dev)
uip_stat.ip.protoerr++;
#endif
dbg("Unrecognized IP protocol\n");
ndbg("Unrecognized IP protocol\n");
goto drop;
}

View file

@ -81,9 +81,9 @@ void uip_neighbor_add(uip_ipaddr_t ipaddr, struct uip_neighbor_addr *addr)
int i, oldest;
uint8 oldest_time;
dbg("Add neighbor: %02x:%02x:%02x:%02x:%02x:%02x\n",
addr->addr.addr[0], addr->addr.addr[1], addr->addr.addr[2],
addr->addr.addr[3], addr->addr.addr[4], addr->addr.addr[5]);
ndbg("Add neighbor: %02x:%02x:%02x:%02x:%02x:%02x\n",
addr->addr.addr[0], addr->addr.addr[1], addr->addr.addr[2],
addr->addr.addr[3], addr->addr.addr[4], addr->addr.addr[5]);
/* Find the first unused entry or the oldest used entry. */
@ -149,9 +149,9 @@ struct uip_neighbor_addr *uip_neighbor_lookup(uip_ipaddr_t ipaddr)
e = find_entry(ipaddr);
if (e != NULL)
{
dbg("Lookup neighbor: %02x:%02x:%02x:%02x:%02x:%02x\n",
e->addr.addr.addr[0], e->addr.addr.addr[1], e->addr.addr.addr[2],
e->addr.addr.addr[3], e->addr.addr.addr[4], e->addr.addr.addr[5]);
ndbg("Lookup neighbor: %02x:%02x:%02x:%02x:%02x:%02x\n",
e->addr.addr.addr[0], e->addr.addr.addr[1], e->addr.addr.addr[2],
e->addr.addr.addr[3], e->addr.addr.addr[4], e->addr.addr.addr[5]);
return &e->addr;
}

View file

@ -98,7 +98,7 @@ void uip_tcpappsend(struct uip_driver_s *dev, struct uip_conn *conn, uint8 resul
{
/* Handle the result based on the application response */
vdbg("result: %02x\n", result);
nvdbg("result: %02x\n", result);
/* Check for connection aborted */
@ -106,7 +106,7 @@ void uip_tcpappsend(struct uip_driver_s *dev, struct uip_conn *conn, uint8 resul
{
dev->d_sndlen = 0;
conn->tcpstateflags = UIP_CLOSED;
vdbg("TCP state: UIP_CLOSED\n");
nvdbg("TCP state: UIP_CLOSED\n");
uip_tcpsend(dev, conn, TCP_RST | TCP_ACK, UIP_IPTCPH_LEN);
}
@ -118,7 +118,7 @@ void uip_tcpappsend(struct uip_driver_s *dev, struct uip_conn *conn, uint8 resul
conn->tcpstateflags = UIP_FIN_WAIT_1;
conn->len = 1;
conn->nrtx = 0;
vdbg("TCP state: UIP_FIN_WAIT_1\n");
nvdbg("TCP state: UIP_FIN_WAIT_1\n");
dev->d_sndlen = 0;
uip_tcpsend(dev, conn, TCP_FIN | TCP_ACK, UIP_IPTCPH_LEN);
@ -204,7 +204,7 @@ void uip_tcpappsend(struct uip_driver_s *dev, struct uip_conn *conn, uint8 resul
void uip_tcprexmit(struct uip_driver_s *dev, struct uip_conn *conn, uint8 result)
{
vdbg("result: %02x\n", result);
nvdbg("result: %02x\n", result);
dev->d_appdata = dev->d_snddata;

View file

@ -110,7 +110,7 @@ uip_dataevent(struct uip_driver_s *dev, struct uip_conn *conn, uint8 flags)
memcpy(readahead->rh_buffer, dev->d_appdata, recvlen);
readahead->rh_nbytes = recvlen;
vdbg("Buffered %d bytes (of %d)\n", recvlen, dev->d_len);
nvdbg("Buffered %d bytes (of %d)\n", recvlen, dev->d_len);
/* Save the readahead buffer in the connection structure where
* it can be found with recv() is called.
@ -167,7 +167,7 @@ uint8 uip_tcpcallback(struct uip_driver_s *dev, struct uip_conn *conn, uint8 fla
uint8 ret = flags;
vdbg("flags: %02x\n", flags);
nvdbg("flags: %02x\n", flags);
/* Check if there is a data callback */
@ -192,7 +192,7 @@ uint8 uip_tcpcallback(struct uip_driver_s *dev, struct uip_conn *conn, uint8 fla
{
/* There is no handler to receive new data in place */
vdbg("No listener on connection\n");
nvdbg("No listener on connection\n");
ret = uip_dataevent(dev, conn, flags);
}

View file

@ -120,7 +120,7 @@ void uip_tcpinput(struct uip_driver_s *dev)
uip_stat.tcp.drop++;
uip_stat.tcp.chkerr++;
#endif
dbg("Bad TCP checksum\n");
ndbg("Bad TCP checksum\n");
goto drop;
}
@ -184,7 +184,7 @@ void uip_tcpinput(struct uip_driver_s *dev)
#ifdef CONFIG_NET_STATISTICS
uip_stat.tcp.syndrop++;
#endif
dbg("No free TCP connections\n");
ndbg("No free TCP connections\n");
goto drop;
}
@ -279,7 +279,7 @@ found:
if (BUF->flags & TCP_RST)
{
conn->tcpstateflags = UIP_CLOSED;
dbg("RESET - TCP state: UIP_CLOSED\n");
ndbg("RESET - TCP state: UIP_CLOSED\n");
(void)uip_tcpcallback(dev, conn, UIP_ABORT);
goto drop;
@ -396,7 +396,7 @@ found:
{
conn->tcpstateflags = UIP_ESTABLISHED;
conn->len = 0;
vdbg("TCP state: UIP_ESTABLISHED\n");
nvdbg("TCP state: UIP_ESTABLISHED\n");
flags = UIP_CONNECTED;
@ -481,7 +481,7 @@ found:
conn->rcv_nxt[1] = BUF->seqno[1];
conn->rcv_nxt[2] = BUF->seqno[2];
conn->rcv_nxt[3] = BUF->seqno[3];
vdbg("TCP state: UIP_ESTABLISHED\n");
nvdbg("TCP state: UIP_ESTABLISHED\n");
uip_incr32(conn->rcv_nxt, 1);
conn->len = 0;
@ -499,7 +499,7 @@ found:
/* The connection is closed after we send the RST */
conn->tcpstateflags = UIP_CLOSED;
vdbg("Connection failed - TCP state: UIP_CLOSED\n");
nvdbg("Connection failed - TCP state: UIP_CLOSED\n");
/* We do not send resets in response to resets. */
@ -543,7 +543,7 @@ found:
conn->tcpstateflags = UIP_LAST_ACK;
conn->len = 1;
conn->nrtx = 0;
vdbg("TCP state: UIP_LAST_ACK\n");
nvdbg("TCP state: UIP_LAST_ACK\n");
uip_tcpsend(dev, conn, TCP_FIN | TCP_ACK, UIP_IPTCPH_LEN);
return;
@ -648,7 +648,7 @@ found:
if (flags & UIP_ACKDATA)
{
conn->tcpstateflags = UIP_CLOSED;
vdbg("UIP_LAST_ACK TCP state: UIP_CLOSED\n");
nvdbg("UIP_LAST_ACK TCP state: UIP_CLOSED\n");
(void)uip_tcpcallback(dev, conn, UIP_CLOSE);
}
@ -671,12 +671,12 @@ found:
conn->tcpstateflags = UIP_TIME_WAIT;
conn->timer = 0;
conn->len = 0;
vdbg("TCP state: UIP_TIME_WAIT\n");
nvdbg("TCP state: UIP_TIME_WAIT\n");
}
else
{
conn->tcpstateflags = UIP_CLOSING;
vdbg("TCP state: UIP_CLOSING\n");
nvdbg("TCP state: UIP_CLOSING\n");
}
uip_incr32(conn->rcv_nxt, 1);
@ -688,7 +688,7 @@ found:
{
conn->tcpstateflags = UIP_FIN_WAIT_2;
conn->len = 0;
vdbg("TCP state: UIP_FIN_WAIT_2\n");
nvdbg("TCP state: UIP_FIN_WAIT_2\n");
goto drop;
}
@ -709,7 +709,7 @@ found:
{
conn->tcpstateflags = UIP_TIME_WAIT;
conn->timer = 0;
vdbg("TCP state: UIP_TIME_WAIT\n");
nvdbg("TCP state: UIP_TIME_WAIT\n");
uip_incr32(conn->rcv_nxt, 1);
(void)uip_tcpcallback(dev, conn, UIP_CLOSE);
@ -733,7 +733,7 @@ found:
{
conn->tcpstateflags = UIP_TIME_WAIT;
conn->timer = 0;
vdbg("TCP state: UIP_TIME_WAIT\n");
nvdbg("TCP state: UIP_TIME_WAIT\n");
}
default:

View file

@ -139,7 +139,7 @@ static void uip_tcpsendcomplete(struct uip_driver_s *dev)
#endif /* CONFIG_NET_IPv6 */
vdbg("Outgoing TCP packet length: %d (%d)\n",
nvdbg("Outgoing TCP packet length: %d (%d)\n",
dev->d_len, (BUF->len[0] << 8) | BUF->len[1]);
#ifdef CONFIG_NET_STATISTICS

View file

@ -123,7 +123,7 @@ void uip_tcptimer(struct uip_driver_s *dev, struct uip_conn *conn, int hsec)
if (conn->timer >= UIP_TIME_WAIT_TIMEOUT)
{
conn->tcpstateflags = UIP_CLOSED;
vdbg("TCP state: UIP_CLOSED\n");
nvdbg("TCP state: UIP_CLOSED\n");
}
}
else if (conn->tcpstateflags != UIP_CLOSED)
@ -157,7 +157,7 @@ void uip_tcptimer(struct uip_driver_s *dev, struct uip_conn *conn, int hsec)
conn->nrtx == UIP_MAXSYNRTX))
{
conn->tcpstateflags = UIP_CLOSED;
vdbg("TCP state: UIP_CLOSED\n");
nvdbg("TCP state: UIP_CLOSED\n");
/* We call uip_tcpcallback() with UIP_TIMEDOUT to
* inform the application that the connection has

View file

@ -76,7 +76,7 @@
void uip_udpcallback(struct uip_driver_s *dev, struct uip_udp_conn *conn,
uint8 flags)
{
vdbg("flags: %02x\n", flags);
nvdbg("flags: %02x\n", flags);
/* Some sanity checking */

View file

@ -111,7 +111,7 @@ void uip_udpinput(struct uip_driver_s *dev)
uip_stat.udp.drop++;
uip_stat.udp.chkerr++;
#endif
dbg("Bad UDP checksum\n");
ndbg("Bad UDP checksum\n");
dev->d_len = 0;
}
else
@ -141,7 +141,7 @@ void uip_udpinput(struct uip_driver_s *dev)
}
else
{
dbg("No listener on UDP port\n");
ndbg("No listener on UDP port\n");
dev->d_len = 0;
}
}

View file

@ -163,7 +163,7 @@ void uip_udpsend(struct uip_driver_s *dev, struct uip_udp_conn *conn)
UDPBUF->udpchksum = 0;
#endif
vdbg("Outgoing UDP packet length: %d (%d)\n",
nvdbg("Outgoing UDP packet length: %d (%d)\n",
dev->d_len, (UDPBUF->len[0] << 8) | UDPBUF->len[1]);
#ifdef CONFIG_NET_STATISTICS

View file

@ -88,13 +88,13 @@ int clock_getres(clockid_t clock_id, struct timespec *res)
uint32 time_res;
int ret = OK;
dbg("clock_id=%d\n", clock_id);
sdbg("clock_id=%d\n", clock_id);
/* Only CLOCK_REALTIME is supported */
if (clock_id != CLOCK_REALTIME)
{
dbg("Returning ERROR\n");
sdbg("Returning ERROR\n");
*get_errno_ptr() = EINVAL;
ret = ERROR;
}
@ -109,9 +109,9 @@ int clock_getres(clockid_t clock_id, struct timespec *res)
res->tv_sec = 0;
res->tv_nsec = time_res;
dbg("Returning res=(%d,%d) time_res=%d\n",
(int)res->tv_sec, (int)res->tv_nsec,
(int)time_res);
sdbg("Returning res=(%d,%d) time_res=%d\n",
(int)res->tv_sec, (int)res->tv_nsec,
(int)time_res);
}
return ret;

View file

@ -90,13 +90,13 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
uint32 nsecs;
int ret = OK;
dbg("clock_id=%d\n", clock_id);
sdbg("clock_id=%d\n", clock_id);
/* Only CLOCK_REALTIME is supported */
if (clock_id != CLOCK_REALTIME)
{
dbg("Returning ERROR\n");
sdbg("Returning ERROR\n");
*get_errno_ptr() = EINVAL;
ret = ERROR;
@ -109,17 +109,17 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
msecs = MSEC_PER_TICK * (g_system_timer - g_tickbias);
dbg("msecs = %d g_tickbias=%d\n",
(int)msecs, (int)g_tickbias);
sdbg("msecs = %d g_tickbias=%d\n",
(int)msecs, (int)g_tickbias);
/* Get the elapsed time in seconds and nanoseconds. */
secs = msecs / MSEC_PER_SEC;
nsecs = (msecs - (secs * MSEC_PER_SEC)) * NSEC_PER_MSEC;
dbg("secs = %d + %d nsecs = %d + %d\n",
(int)msecs, (int)g_basetime.tv_sec,
(int)nsecs, (int)g_basetime.tv_nsec);
sdbg("secs = %d + %d nsecs = %d + %d\n",
(int)msecs, (int)g_basetime.tv_sec,
(int)nsecs, (int)g_basetime.tv_nsec);
/* Add the base time to this. */
@ -140,8 +140,8 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
tp->tv_sec = (time_t)secs;
tp->tv_nsec = (long)nsecs;
dbg("Returning tp=(%d,%d)\n",
(int)tp->tv_sec, (int)tp->tv_nsec);
sdbg("Returning tp=(%d,%d)\n",
(int)tp->tv_sec, (int)tp->tv_nsec);
}
return ret;

View file

@ -87,13 +87,13 @@ int clock_settime(clockid_t clock_id, const struct timespec *tp)
{
int ret = OK;
dbg("clock_id=%d\n", clock_id);
sdbg("clock_id=%d\n", clock_id);
/* Only CLOCK_REALTIME is supported */
if (clock_id != CLOCK_REALTIME || !tp)
{
dbg("Returning ERROR\n");
sdbg("Returning ERROR\n");
*get_errno_ptr() = EINVAL;
ret = ERROR;
}
@ -110,7 +110,7 @@ int clock_settime(clockid_t clock_id, const struct timespec *tp)
g_tickbias = g_system_timer;
dbg("basetime=(%d,%d) tickbias=%d\n",
sdbg("basetime=(%d,%d) tickbias=%d\n",
(int)g_basetime.tv_sec, (int)g_basetime.tv_nsec,
(int)g_tickbias);
}

View file

@ -177,7 +177,7 @@ struct tm *gmtime_r(const time_t *clock, struct tm *result)
/* Get the seconds since the EPOCH */
time = *clock;
dbg("clock=%d\n", (int)time);
sdbg("clock=%d\n", (int)time);
/* Convert to days, hours, minutes, and seconds since the EPOCH */
@ -192,15 +192,15 @@ struct tm *gmtime_r(const time_t *clock, struct tm *result)
sec = time;
dbg("hour=%d min=%d sec=%d\n",
(int)hour, (int)min, (int)sec);
sdbg("hour=%d min=%d sec=%d\n",
(int)hour, (int)min, (int)sec);
/* Convert the days since the EPOCH to calendar day */
clock_utc2calendar(jdn, &year, &month, &day);
dbg("jdn=%d year=%d month=%d day=%d\n",
(int)jdn, (int)year, (int)month, (int)day);
sdbg("jdn=%d year=%d month=%d day=%d\n",
(int)jdn, (int)year, (int)month, (int)day);
/* Then return the struct tm contents */

View file

@ -126,14 +126,14 @@ time_t mktime(struct tm *tp)
*/
jdn = clock_calendar2utc(tp->tm_year+1900, tp->tm_mon+1, tp->tm_mday);
dbg("jdn=%d tm_year=%d tm_mon=%d tm_mday=%d\n",
(int)jdn, tp->tm_year, tp->tm_mon, tp->tm_mday);
sdbg("jdn=%d tm_year=%d tm_mon=%d tm_mday=%d\n",
(int)jdn, tp->tm_year, tp->tm_mon, tp->tm_mday);
/* Return the seconds into the julian day. */
ret = ((jdn*24 + tp->tm_hour)*60 + tp->tm_min)*60 + tp->tm_sec;
dbg("%s:\tret=%d tm_hour=%d tm_min=%d tm_sec=%d\n",
(int)ret, tp->tm_hour, tp->tm_min, tp->tm_sec);
sdbg("ret=%d tm_hour=%d tm_min=%d tm_sec=%d\n",
(int)ret, tp->tm_hour, tp->tm_min, tp->tm_sec);
return ret;
}

View file

@ -207,7 +207,7 @@ FAR mqmsg_t *mq_msgalloc(void)
else
{
dbg("Out of messages\n");
sdbg("Out of messages\n");
PANIC((uint32)OSERR_OUTOFMESSAGES);
}
}

View file

@ -216,7 +216,7 @@ void os_start(void)
int init_taskid;
int i;
lldbg("Entry\n");
slldbg("Entry\n");
/* Initialize all task lists */
@ -427,7 +427,7 @@ void os_start(void)
* started by spawning the user init thread of execution.
*/
dbg("Starting init thread\n");
sdbg("Starting init thread\n");
#ifndef CONFIG_CUSTOM_STACK
init_taskid = task_create("init", SCHED_PRIORITY_DEFAULT,
CONFIG_PROC_STACK_SIZE,
@ -440,7 +440,7 @@ void os_start(void)
/* When control is return to this point, the system is idle. */
dbg("Beginning Idle Loop\n");
sdbg("Beginning Idle Loop\n");
for (;;)
{
/* Check if there is anything in the delayed deallocation list.

View file

@ -89,7 +89,7 @@ int pthread_attr_destroy(pthread_attr_t *attr)
{
int ret;
dbg("attr=0x%p\n", attr);
sdbg("attr=0x%p\n", attr);
if (!attr)
{
@ -101,7 +101,7 @@ int pthread_attr_destroy(pthread_attr_t *attr)
ret = OK;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -92,7 +92,7 @@ int pthread_attr_getinheritsched(const pthread_attr_t *attr,
{
int ret;
dbg("attr=0x%p inheritsched=0x%p\n", attr, inheritsched);
sdbg("attr=0x%p inheritsched=0x%p\n", attr, inheritsched);
if (!attr || !inheritsched)
{
@ -104,7 +104,7 @@ int pthread_attr_getinheritsched(const pthread_attr_t *attr,
ret = OK;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -90,7 +90,7 @@ int pthread_attr_getschedparam(pthread_attr_t *attr,
{
int ret;
dbg("attr=0x%p param=0x%p\n", attr, param);
sdbg("attr=0x%p param=0x%p\n", attr, param);
if (!attr || !param)
{
@ -102,7 +102,7 @@ int pthread_attr_getschedparam(pthread_attr_t *attr,
ret = OK;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -89,7 +89,7 @@ int pthread_attr_getschedpolicy(pthread_attr_t *attr, int *policy)
{
int ret;
dbg("attr=0x%p policy=0x%p\n", attr, policy);
sdbg("attr=0x%p policy=0x%p\n", attr, policy);
if (!attr || !policy)
{
@ -101,6 +101,6 @@ int pthread_attr_getschedpolicy(pthread_attr_t *attr, int *policy)
ret = OK;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -88,7 +88,7 @@ int pthread_attr_getstacksize(pthread_attr_t *attr, long *stacksize)
{
int ret;
dbg("attr=0x%p stacksize=0x%p\n", attr, stacksize);
sdbg("attr=0x%p stacksize=0x%p\n", attr, stacksize);
if (!stacksize)
{
@ -100,7 +100,7 @@ int pthread_attr_getstacksize(pthread_attr_t *attr, long *stacksize)
ret = OK;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -90,7 +90,7 @@ int pthread_attr_init(pthread_attr_t *attr)
{
int ret = OK;
dbg("attr=0x%p\n", attr);
sdbg("attr=0x%p\n", attr);
if (!attr)
{
ret = ENOMEM;
@ -105,7 +105,7 @@ int pthread_attr_init(pthread_attr_t *attr)
memcpy(attr, &g_default_pthread_attr, sizeof(pthread_attr_t));
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -92,7 +92,7 @@ int pthread_attr_setinheritsched(pthread_attr_t *attr,
{
int ret;
dbg("inheritsched=%d\n", inheritsched);
sdbg("inheritsched=%d\n", inheritsched);
if (!attr ||
(inheritsched != PTHREAD_INHERIT_SCHED &&
@ -106,7 +106,7 @@ int pthread_attr_setinheritsched(pthread_attr_t *attr,
ret = OK;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -90,7 +90,7 @@ int pthread_attr_setschedparam(pthread_attr_t *attr,
{
int ret;
dbg("attr=0x%p param=0x%p\n", attr, param);
sdbg("attr=0x%p param=0x%p\n", attr, param);
if (!attr || !param)
{
@ -101,7 +101,7 @@ int pthread_attr_setschedparam(pthread_attr_t *attr,
attr->priority = (short)param->sched_priority;
ret = OK;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -90,7 +90,7 @@ int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)
{
int ret;
dbg("attr=0x%p policy=%d\n", attr, policy);
sdbg("attr=0x%p policy=%d\n", attr, policy);
#if CONFIG_RR_INTERVAL > 0
if (!attr || (policy != SCHED_FIFO && policy != SCHED_RR))
@ -106,6 +106,6 @@ int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)
ret = OK;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -88,7 +88,7 @@ int pthread_attr_setstacksize(pthread_attr_t *attr, long stacksize)
{
int ret;
dbg("attr=0x%p stacksize=%ld\n", attr, stacksize);
sdbg("attr=0x%p stacksize=%ld\n", attr, stacksize);
if (!attr || stacksize < PTHREAD_STACK_MIN)
{
@ -100,7 +100,7 @@ int pthread_attr_setstacksize(pthread_attr_t *attr, long stacksize)
ret = OK;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -79,7 +79,7 @@ static boolean pthread_notifywaiters(FAR join_t *pjoin)
int ntasks_waiting;
int status;
dbg("pjoin=0x%p\n", pjoin);
sdbg("pjoin=0x%p\n", pjoin);
/* Are any tasks waiting for our exit value? */
@ -144,7 +144,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value)
{
FAR join_t *pjoin;
dbg("process_id=%d exit_value=%p\n", pid, exit_value);
sdbg("process_id=%d exit_value=%p\n", pid, exit_value);
/* First, find thread's structure in the private data set. */
@ -209,7 +209,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value)
void pthread_destroyjoin(FAR join_t *pjoin)
{
dbg("pjoin=0x%p\n", pjoin);
sdbg("pjoin=0x%p\n", pjoin);
/* Remove the join info from the set of joins */

View file

@ -67,14 +67,14 @@ int pthread_condattr_destroy(pthread_condattr_t *attr)
{
int ret = OK;
dbg("attr=0x%p\n", attr);
sdbg("attr=0x%p\n", attr);
if (!attr)
{
ret = EINVAL;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -67,7 +67,7 @@ int pthread_condattr_init(pthread_condattr_t *attr)
{
int ret = OK;
dbg("attr=0x%p\n", attr);
sdbg("attr=0x%p\n", attr);
if (!attr)
{
@ -78,7 +78,7 @@ int pthread_condattr_init(pthread_condattr_t *attr)
*attr = 0;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -89,7 +89,7 @@ int pthread_cond_broadcast(pthread_cond_t *cond)
int ret = OK;
int sval;
dbg("cond=0x%p\n", cond);
sdbg("cond=0x%p\n", cond);
if (!cond)
{
@ -135,7 +135,7 @@ int pthread_cond_broadcast(pthread_cond_t *cond)
sched_unlock();
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -67,7 +67,7 @@ int pthread_cond_destroy(pthread_cond_t *cond)
{
int ret = OK;
dbg("cond=0x%p\n", cond);
sdbg("cond=0x%p\n", cond);
if (!cond)
{
@ -81,7 +81,7 @@ int pthread_cond_destroy(pthread_cond_t *cond)
ret = EINVAL;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -67,7 +67,7 @@ int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr)
{
int ret = OK;
dbg("cond=0x%p attr=0x%p\n", cond, attr);
sdbg("cond=0x%p attr=0x%p\n", cond, attr);
if (!cond)
{
@ -83,7 +83,7 @@ int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr)
ret = EINVAL;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -88,7 +88,7 @@ int pthread_cond_signal(pthread_cond_t *cond)
int ret = OK;
int sval;
dbg("cond=0x%p\n", cond);
sdbg("cond=0x%p\n", cond);
if (!cond)
{
@ -110,16 +110,16 @@ int pthread_cond_signal(pthread_cond_t *cond)
else
{
dbg("sval=%d\n", sval);
sdbg("sval=%d\n", sval);
if (sval < 0)
{
dbg("Signalling...\n");
sdbg("Signalling...\n");
ret = pthread_givesemaphore((sem_t*)&cond->sem);
}
}
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -138,7 +138,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
int ret = OK;
int status;
dbg("cond=0x%p mutex=0x%p abstime=0x%p\n", cond, mutex, abstime);
sdbg("cond=0x%p mutex=0x%p abstime=0x%p\n", cond, mutex, abstime);
/* Make sure that non-NULL references were provided. */
@ -174,7 +174,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
}
else
{
dbg("Give up mutex...\n");
sdbg("Give up mutex...\n");
/* We must disable pre-emption and interrupts here so that
* the time stays valid until the wait begins. This adds
@ -254,7 +254,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
if (*get_errno_ptr() == EINTR)
{
dbg("Timedout!\n");
sdbg("Timedout!\n");
ret = ETIMEDOUT;
}
else
@ -274,7 +274,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
/* Reacquire the mutex (retaining the ret). */
dbg("Re-locking...\n");
sdbg("Re-locking...\n");
status = pthread_takesemaphore((sem_t*)&mutex->sem);
if (!status)
{
@ -299,7 +299,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
}
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -90,7 +90,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
{
int ret;
dbg("cond=0x%p mutex=0x%p\n", cond, mutex);
sdbg("cond=0x%p mutex=0x%p\n", cond, mutex);
/* Make sure that non-NULL references were provided. */
@ -110,7 +110,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
{
/* Give up the mutex */
dbg("Give up mutex / take cond\n");
sdbg("Give up mutex / take cond\n");
sched_lock();
mutex->pid = 0;
@ -123,7 +123,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
/* Reacquire the mutex */
dbg("Reacquire mutex...\n");
sdbg("Reacquire mutex...\n");
ret |= pthread_takesemaphore((sem_t*)&mutex->sem);
if (!ret)
{
@ -131,7 +131,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
}
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -90,7 +90,7 @@ int pthread_detach(pthread_t thread)
FAR join_t *pjoin;
int ret;
dbg("Thread=%d\n", thread);
sdbg("Thread=%d\n", thread);
/* Find the entry associated with this pthread. */
@ -98,7 +98,7 @@ int pthread_detach(pthread_t thread)
pjoin = pthread_findjoininfo((pid_t)thread);
if (!pjoin)
{
dbg("Could not find thread entry\n");
sdbg("Could not find thread entry\n");
ret = EINVAL;
}
else
@ -127,6 +127,6 @@ int pthread_detach(pthread_t thread)
}
(void)pthread_givesemaphore(&g_join_semaphore);
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -92,7 +92,7 @@ void pthread_exit(FAR void *exit_value)
int error_code = (int)exit_value;
int status;
dbg("exit_value=%p\n", exit_value);
sdbg("exit_value=%p\n", exit_value);
/* Block any signal actions that would awaken us while were
* are performing the JOIN handshake.

View file

@ -108,7 +108,7 @@ int pthread_getschedparam(pthread_t thread, int *policy,
{
int ret;
dbg("Thread ID=%d policy=0x%p param=0x%p\n", thread, policy, param);
sdbg("Thread ID=%d policy=0x%p param=0x%p\n", thread, policy, param);
if (!policy || !param)
{
@ -133,7 +133,7 @@ int pthread_getschedparam(pthread_t thread, int *policy,
}
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -99,7 +99,7 @@ int pthread_join(pthread_t thread, pthread_addr_t *pexit_value)
FAR join_t *pjoin;
int ret;
dbg("thread=%d\n", thread);
sdbg("thread=%d\n", thread);
/* First make sure that this is not an attempt to join to
* ourself.
@ -132,7 +132,7 @@ int pthread_join(pthread_t thread, pthread_addr_t *pexit_value)
FAR _TCB *tcb = sched_gettcb((pthread_t)thread);
dbg("Could not find thread data\n");
sdbg("Could not find thread data\n");
/* Case (1) or (3) -- we can't tell which. Assume (3) */
@ -170,19 +170,19 @@ int pthread_join(pthread_t thread, pthread_addr_t *pexit_value)
if (pjoin->terminated)
{
dbg("Thread has terminated\n");
sdbg("Thread has terminated\n");
/* Get the thread exit value from the terminated thread. */
if (pexit_value)
{
dbg("exit_value=0x%p\n", pjoin->exit_value);
sdbg("exit_value=0x%p\n", pjoin->exit_value);
*pexit_value = pjoin->exit_value;
}
}
else
{
dbg("Thread is still running\n");
sdbg("Thread is still running\n");
/* Relinquish the data set semaphore. Since pre-emption is
* disabled, we can be certain that no task has the
@ -206,7 +206,7 @@ int pthread_join(pthread_t thread, pthread_addr_t *pexit_value)
if (pexit_value)
{
*pexit_value = pjoin->exit_value;
dbg("exit_value=0x%p\n", pjoin->exit_value);
sdbg("exit_value=0x%p\n", pjoin->exit_value);
}
/* Post the thread's data semaphore so that the exitting thread
@ -241,7 +241,7 @@ int pthread_join(pthread_t thread, pthread_addr_t *pexit_value)
ret = OK;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -88,7 +88,7 @@ int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
{
int ret = OK;
dbg("attr=0x%p\n", attr);
sdbg("attr=0x%p\n", attr);
if (!attr)
{
@ -99,6 +99,6 @@ int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
attr->pshared = 0;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -88,7 +88,7 @@ int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared)
{
int ret = OK;
dbg("attr=0x%p pshared=0x%p\n", attr, pshared);
sdbg("attr=0x%p pshared=0x%p\n", attr, pshared);
if (!attr || !pshared)
{
@ -99,6 +99,6 @@ int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared)
*pshared = attr->pshared;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -87,7 +87,7 @@ int pthread_mutexattr_init(pthread_mutexattr_t *attr)
{
int ret = OK;
dbg("attr=0x%p\n", attr);
sdbg("attr=0x%p\n", attr);
if (!attr)
{
@ -98,6 +98,6 @@ int pthread_mutexattr_init(pthread_mutexattr_t *attr)
attr->pshared = 0;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -88,7 +88,7 @@ int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared)
{
int ret = OK;
dbg("attr=0x%p pshared=%d\n", attr, pshared);
sdbg("attr=0x%p pshared=%d\n", attr, pshared);
if (!attr || (pshared != 0 && pshared != 1))
{
@ -99,6 +99,6 @@ int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared)
attr->pshared = pshared;
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -90,7 +90,7 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex)
int ret = OK;
int status;
dbg("mutex=0x%p\n", mutex);
sdbg("mutex=0x%p\n", mutex);
if (!mutex)
{
@ -123,6 +123,6 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex)
sched_unlock();
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -89,7 +89,7 @@ int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr)
int pshared = 0;
int status;
dbg("mutex=0x%p attr=0x%p\n", mutex, attr);
sdbg("mutex=0x%p attr=0x%p\n", mutex, attr);
if (!mutex)
{
@ -117,6 +117,6 @@ int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr)
}
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -90,7 +90,7 @@ int pthread_mutex_lock(pthread_mutex_t *mutex)
int mypid = (int)getpid();
int ret = OK;
dbg("mutex=0x%p\n", mutex);
sdbg("mutex=0x%p\n", mutex);
if (!mutex)
{
@ -108,7 +108,7 @@ int pthread_mutex_lock(pthread_mutex_t *mutex)
if (mutex->pid == mypid)
{
dbg("Returning EDEADLK\n");
sdbg("Returning EDEADLK\n");
ret = EDEADLK;
}
else
@ -129,7 +129,7 @@ int pthread_mutex_lock(pthread_mutex_t *mutex)
sched_unlock();
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -90,7 +90,7 @@ int pthread_mutex_trylock(pthread_mutex_t *mutex)
{
int ret = OK;
dbg("mutex=0x%p\n", mutex);
sdbg("mutex=0x%p\n", mutex);
if (!mutex)
{
@ -129,7 +129,7 @@ int pthread_mutex_trylock(pthread_mutex_t *mutex)
sched_unlock();
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -89,7 +89,7 @@ int pthread_mutex_unlock(pthread_mutex_t *mutex)
{
int ret = OK;
dbg("mutex=0x%p\n", mutex);
sdbg("mutex=0x%p\n", mutex);
if (!mutex)
{
@ -107,7 +107,7 @@ int pthread_mutex_unlock(pthread_mutex_t *mutex)
if (mutex->pid != (int)getpid())
{
dbg("Holder=%d returning EPERM\n", mutex->pid);
sdbg("Holder=%d returning EPERM\n", mutex->pid);
ret = EPERM;
}
else
@ -120,7 +120,7 @@ int pthread_mutex_unlock(pthread_mutex_t *mutex)
sched_unlock();
}
dbg("Returning %d\n", ret);
sdbg("Returning %d\n", ret);
return ret;
}

View file

@ -120,7 +120,7 @@ int pthread_setschedparam(pthread_t thread, int policy,
{
int ret;
dbg("thread ID=%d policy=%d param=0x%p\n", thread, policy, param);
sdbg("thread ID=%d policy=%d param=0x%p\n", thread, policy, param);
/* Set the errno to some non-zero value (failsafe) */

View file

@ -103,7 +103,7 @@ void sig_deliver(FAR _TCB *stcb)
for (sigq = (FAR sigq_t*)stcb->sigpendactionq.head; (sigq); sigq = next)
{
next = sigq->flink;
dbg("sig_deliver: Sending signal sigq=0x%x\n", sigq);
sdbg("Sending signal sigq=0x%x\n", sigq);
/* Remove the signal structure from the sigpendactionq and place it
* in the sigpostedq. NOTE: Since signals are processed one at a

View file

@ -112,7 +112,7 @@ int kill(pid_t pid, int signo)
/* Get the TCB of the receiving task */
stcb = sched_gettcb(pid);
dbg("TCB=0x%08x signo=%d\n", stcb, signo);
sdbg("TCB=0x%08x signo=%d\n", stcb, signo);
if (!stcb)
{
*get_errno_ptr() = ESRCH;

View file

@ -98,9 +98,9 @@ int sig_mqnotempty (int pid, int signo, void *sival_ptr)
stcb = sched_gettcb(pid);
#ifdef CONFIG_CAN_PASS_STRUCTS
dbg("TCB=%p signo=%d value=%d\n", stcb, signo, value.sival_int);
sdbg("TCB=%p signo=%d value=%d\n", stcb, signo, value.sival_int);
#else
dbg("TCB=%p signo=%d sival_ptr=%p\n", stcb, signo, sival_ptr);
sdbg("TCB=%p signo=%d sival_ptr=%p\n", stcb, signo, sival_ptr);
#endif
/* Create the siginfo structure */

View file

@ -131,9 +131,9 @@ int sigqueue(int pid, int signo, void *sival_ptr)
stcb = sched_gettcb(pid);
#ifdef CONFIG_CAN_PASS_STRUCTS
dbg("TCB=0x%08x signo=%d value=%d\n", stcb, signo, value.sival_int);
sdbg("TCB=0x%08x signo=%d value=%d\n", stcb, signo, value.sival_int);
#else
dbg("TCB=0x%08x signo=%d value=%p\n", stcb, signo, sival_ptr);
sdbg("TCB=0x%08x signo=%d value=%p\n", stcb, signo, sival_ptr);
#endif
if (pid == 0 || !stcb)
{

View file

@ -289,8 +289,9 @@ int sig_received(FAR _TCB *stcb, siginfo_t *info)
irqstate_t saved_state;
int ret = ERROR;
dbg("sig_received: TCB=0x%08x signo=%d code=%d value=%d mask=%08x\n",
stcb, info->si_signo, info->si_code, info->si_value.sival_int, stcb->sigprocmask);
sdbg("TCB=0x%08x signo=%d code=%d value=%d mask=%08x\n",
stcb, info->si_signo, info->si_code,
info->si_value.sival_int, stcb->sigprocmask);
if (stcb && info)
{