mirror of
https://github.com/apache/nuttx.git
synced 2026-03-27 02:29:15 +08:00
Merged in antmerlino/nuttx/iobinstrumentation (pull request #1001)
Iobinstrumentation * mm/iob: Introduces producer/consumer id to every iob call. This is so that the calls can be instrumented to monitor the IOB resources. * iob instrumentation - Merges producer/consumer enumeration for simpler IOB user. * fs/procfs: Starts adding support for /proc/iobinfo * fs/procfs: Finishes first pass of simple IOB user stastics and /proc/iobinfo entry Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
committed by
Gregory Nutt
parent
f5f302cff5
commit
70404ed0dc
@@ -715,7 +715,7 @@ static void spirit_free_txhead(FAR struct spirit_driver_s *priv)
|
||||
|
||||
/* Free the IOB contained in the metadata container */
|
||||
|
||||
iob_free(pktmeta->pm_iob);
|
||||
iob_free(pktmeta->pm_iob, IOBUSER_WIRELESS_PACKETRADIO);
|
||||
|
||||
/* Then free the meta data container itself */
|
||||
|
||||
@@ -1175,7 +1175,7 @@ static void spirit_interrupt_work(FAR void *arg)
|
||||
|
||||
if (priv->rxbuffer != NULL)
|
||||
{
|
||||
iob_free(priv->rxbuffer);
|
||||
iob_free(priv->rxbuffer, IOBUSER_WIRELESS_PACKETRADIO);
|
||||
priv->rxbuffer = NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -1329,7 +1329,7 @@ static void spirit_interrupt_work(FAR void *arg)
|
||||
|
||||
if (priv->rxbuffer == NULL)
|
||||
{
|
||||
priv->rxbuffer = iob_alloc(0);
|
||||
priv->rxbuffer = iob_alloc(false, IOBUSER_WIRELESS_PACKETRADIO);
|
||||
}
|
||||
|
||||
if (priv->rxbuffer != NULL)
|
||||
@@ -1404,7 +1404,7 @@ static void spirit_interrupt_work(FAR void *arg)
|
||||
{
|
||||
/* Allocate an I/O buffer to hold the received packet. */
|
||||
|
||||
iob = iob_alloc(0);
|
||||
iob = iob_alloc(false, IOBUSER_WIRELESS_PACKETRADIO);
|
||||
}
|
||||
|
||||
if (iob == NULL)
|
||||
@@ -1444,7 +1444,7 @@ static void spirit_interrupt_work(FAR void *arg)
|
||||
{
|
||||
wlerr("ERROR: Failed to allocate metadata... dropping\n");
|
||||
NETDEV_RXDROPPED(&priv->radio.r_dev);
|
||||
iob_free(iob);
|
||||
iob_free(iob, IOBUSER_WIRELESS_PACKETRADIO);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1525,7 +1525,7 @@ static void spirit_interrupt_work(FAR void *arg)
|
||||
{
|
||||
/* If not, then allocate one now. */
|
||||
|
||||
priv->rxbuffer = iob_alloc(0);
|
||||
priv->rxbuffer = iob_alloc(false, IOBUSER_WIRELESS_PACKETRADIO);
|
||||
iob = priv->rxbuffer;
|
||||
offset = 0;
|
||||
}
|
||||
@@ -1553,7 +1553,7 @@ static void spirit_interrupt_work(FAR void *arg)
|
||||
/* Free the IOB */
|
||||
|
||||
priv->rxbuffer = NULL;
|
||||
iob_free(iob);
|
||||
iob_free(iob, IOBUSER_WIRELESS_PACKETRADIO);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1614,7 +1614,7 @@ static void spirit_interrupt_work(FAR void *arg)
|
||||
|
||||
if (priv->rxbuffer != NULL)
|
||||
{
|
||||
iob_free(priv->rxbuffer);
|
||||
iob_free(priv->rxbuffer, IOBUSER_WIRELESS_PACKETRADIO);
|
||||
priv->rxbuffer = NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -2357,7 +2357,7 @@ static int spirit_req_data(FAR struct radio_driver_s *netdev,
|
||||
{
|
||||
wlerr("ERROR: Failed to allocate metadata... dropping\n");
|
||||
NETDEV_RXDROPPED(&priv->radio.r_dev);
|
||||
iob_free(iob);
|
||||
iob_free(iob, IOBUSER_WIRELESS_PACKETRADIO);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user