mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
Fix some spacing problems
This commit is contained in:
parent
863ded3584
commit
0b12dbf95d
88 changed files with 226 additions and 229 deletions
2
arch
2
arch
|
|
@ -1 +1 @@
|
|||
Subproject commit 0c8200c21f76a67e621d364b51e73bda4f6ba28c
|
||||
Subproject commit cc863e71f9fdf2b418365ff58ec2103dc1abbfcd
|
||||
|
|
@ -142,7 +142,7 @@ EXEPATH_HANDLE exepath_init(void)
|
|||
return (EXEPATH_HANDLE)exepath;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: exepath_next
|
||||
*
|
||||
* Description:
|
||||
|
|
|
|||
|
|
@ -129,13 +129,13 @@ symtab_findorderedbyname(FAR const struct symtab_s *symtab,
|
|||
}
|
||||
}
|
||||
|
||||
/* low == high... One final check. We might not have actually tested
|
||||
* the final symtab[] name.
|
||||
*
|
||||
* Example: Only the last pass through loop, suppose low = 1, high = 2,
|
||||
* mid = 1, and symtab[high].sym_name == name. Then we would get here with
|
||||
* low = 2, high = 2, but symtab[2].sym_name was never tested.
|
||||
*/
|
||||
/* low == high... One final check. We might not have actually tested
|
||||
* the final symtab[] name.
|
||||
*
|
||||
* Example: Only the last pass through loop, suppose low = 1, high = 2,
|
||||
* mid = 1, and symtab[high].sym_name == name. Then we would get here with
|
||||
* low = 2, high = 2, but symtab[2].sym_name was never tested.
|
||||
*/
|
||||
|
||||
return strcmp(name, symtab[low].sym_name) == 0 ? &symtab[low] : NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,13 +114,13 @@ symtab_findorderedbyvalue(FAR const struct symtab_s *symtab,
|
|||
}
|
||||
}
|
||||
|
||||
/* low == high... One final check. We might not have actually tested
|
||||
* the final symtab[] name.
|
||||
*
|
||||
* Example: Only the last pass through loop, suppose low = 1, high = 2,
|
||||
* mid = 1, and symtab[high].sym_name == name. Then we would get here with
|
||||
* low = 2, high = 2, but symtab[2].sym_name was never tested.
|
||||
*/
|
||||
/* low == high... One final check. We might not have actually tested
|
||||
* the final symtab[] name.
|
||||
*
|
||||
* Example: Only the last pass through loop, suppose low = 1, high = 2,
|
||||
* mid = 1, and symtab[high].sym_name == name. Then we would get here with
|
||||
* low = 2, high = 2, but symtab[2].sym_name was never tested.
|
||||
*/
|
||||
|
||||
return value == symtab[low].sym_value ? &symtab[low] : NULL;
|
||||
}
|
||||
|
|
|
|||
2
configs
2
configs
|
|
@ -1 +1 @@
|
|||
Subproject commit 87c0e8d6124f7e0ec849e5430534eedd9495aba9
|
||||
Subproject commit dbc09272e2e97c118372075d47281a563dc61db1
|
||||
|
|
@ -426,14 +426,14 @@ static ssize_t dac_write(FAR struct file *filep, FAR const char *buffer, size_t
|
|||
nsent += msglen;
|
||||
}
|
||||
|
||||
/* We get here after all messages have been added to the FIFO. Check if
|
||||
* we need to kick of the XMIT sequence.
|
||||
*/
|
||||
/* We get here after all messages have been added to the FIFO. Check if
|
||||
* we need to kick of the XMIT sequence.
|
||||
*/
|
||||
|
||||
if (empty)
|
||||
{
|
||||
dac_xmit(dev);
|
||||
}
|
||||
if (empty)
|
||||
{
|
||||
dac_xmit(dev);
|
||||
}
|
||||
|
||||
/* Return the number of bytes that were sent */
|
||||
|
||||
|
|
|
|||
|
|
@ -698,14 +698,14 @@ static ssize_t can_write(FAR struct file *filep, FAR const char *buffer,
|
|||
nsent += msglen;
|
||||
}
|
||||
|
||||
/* We get here after all messages have been added to the FIFO. Check if
|
||||
* we need to kick of the XMIT sequence.
|
||||
*/
|
||||
/* We get here after all messages have been added to the FIFO. Check if
|
||||
* we need to kick of the XMIT sequence.
|
||||
*/
|
||||
|
||||
if (inactive)
|
||||
{
|
||||
can_xmit(dev);
|
||||
}
|
||||
if (inactive)
|
||||
{
|
||||
can_xmit(dev);
|
||||
}
|
||||
|
||||
/* Return the number of bytes that were sent */
|
||||
|
||||
|
|
|
|||
|
|
@ -937,7 +937,7 @@ static inline int mio283qt2_hwinitialize(FAR struct mio283qt2_dev_s *priv)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************************************
|
||||
/**************************************************************************************
|
||||
* Public Functions
|
||||
**************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -833,7 +833,7 @@ static inline int mio283qt9a_hwinitialize(FAR struct mio283qt9a_dev_s *priv)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************************************
|
||||
/**************************************************************************************
|
||||
* Public Functions
|
||||
**************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ static const uint8_t g_sleepon[] =
|
|||
static const uint8_t g_horzinc[] =
|
||||
{
|
||||
SSD1329_GDDRAM_REMAP,
|
||||
(SSD1329_COM_SPLIT|SSD1329_COM_REMAP|SSD1329_NIBBLE_REMAP),
|
||||
(SSD1329_COM_SPLIT|SSD1329_COM_REMAP|SSD1329_NIBBLE_REMAP),
|
||||
};
|
||||
|
||||
/* The following set a window that covers the entire display */
|
||||
|
|
|
|||
|
|
@ -1079,7 +1079,7 @@ static inline int ra8875_hwinitialize(FAR struct ra8875_dev_s *priv)
|
|||
return OK;
|
||||
}
|
||||
|
||||
/*************************************************************************************
|
||||
/**************************************************************************************
|
||||
* Public Functions
|
||||
**************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -1284,7 +1284,7 @@ static inline int ssd1289_hwinitialize(FAR struct ssd1289_dev_s *priv)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************************************
|
||||
/**************************************************************************************
|
||||
* Public Functions
|
||||
**************************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -232,10 +232,10 @@ struct st7567_dev_s
|
|||
uint8_t contrast;
|
||||
uint8_t powered;
|
||||
|
||||
/* The ST7567 does not support reading from the display memory in SPI mode.
|
||||
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
||||
* a shadow copy of the framebuffer memory.
|
||||
*/
|
||||
/* The ST7567 does not support reading from the display memory in SPI mode.
|
||||
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
||||
* a shadow copy of the framebuffer memory.
|
||||
*/
|
||||
|
||||
uint8_t fb[ST7567_FBSIZE];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -287,10 +287,10 @@ struct ug2864ambag01_dev_s
|
|||
bool on; /* true: display is on */
|
||||
|
||||
|
||||
/* The SH1101A does not support reading from the display memory in SPI mode.
|
||||
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
||||
* a shadow copy of the framebuffer memory. At 128x64, this amounts to 1KB.
|
||||
*/
|
||||
/* The SH1101A does not support reading from the display memory in SPI mode.
|
||||
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
||||
* a shadow copy of the framebuffer memory. At 128x64, this amounts to 1KB.
|
||||
*/
|
||||
|
||||
uint8_t fb[UG2864AMBAG01_FBSIZE];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -247,10 +247,10 @@ struct ug_dev_s
|
|||
uint8_t contrast;
|
||||
uint8_t powered;
|
||||
|
||||
/* The SSD1305 does not support reading from the display memory in SPI mode.
|
||||
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
||||
* a shadow copy of the framebuffer memory.
|
||||
*/
|
||||
/* The SSD1305 does not support reading from the display memory in SPI mode.
|
||||
* Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
|
||||
* a shadow copy of the framebuffer memory.
|
||||
*/
|
||||
|
||||
uint8_t fb[UG_FBSIZE];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -640,7 +640,7 @@ static ssize_t at45db_bread(FAR struct mtd_dev_s *mtd, off_t startblock,
|
|||
FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd;
|
||||
ssize_t nbytes;
|
||||
|
||||
/* On this device, we can handle the block read just like the byte-oriented read */
|
||||
/* On this device, we can handle the block read just like the byte-oriented read */
|
||||
|
||||
nbytes = at45db_read(mtd, startblock << priv->pageshift,
|
||||
nblocks << priv->pageshift, buffer);
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ static int nand_writepage(FAR struct nand_dev_s *nand, off_t block,
|
|||
* ECC calculations.
|
||||
*/
|
||||
|
||||
else
|
||||
else
|
||||
#endif
|
||||
{
|
||||
return NAND_WRITEPAGE(nand->raw, block, page, data, NULL);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
#define EBICSA_EBI_DBPDC (1 << 9)
|
||||
#define EBICSA_NAND_D0_ON_D16 (1 << 24)
|
||||
|
||||
/* Misc. definitions */
|
||||
/* Misc. definitions */
|
||||
|
||||
#define MAX_READ_STATUS_COUNT 100000 /* Read status timeout */
|
||||
#define ONFI_PARAM_TABLE_SIZE 116 /* Not all 256 bytes are useful */
|
||||
|
|
|
|||
|
|
@ -644,9 +644,9 @@ static inline int st25fl1_readid(struct st25fl1_dev_s *priv)
|
|||
default:
|
||||
fdbg("ERROR: Unsupported memory capacity: %02x\n", priv->cmdbuf[2]);
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
|
||||
return OK;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
|
|
|
|||
|
|
@ -1257,16 +1257,16 @@ static int dm9x_interrupt(int irq, FAR void *context)
|
|||
ndbg("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
|
||||
}
|
||||
|
||||
/* Check if we received an incoming packet */
|
||||
/* Check if we received an incoming packet */
|
||||
|
||||
if (isr & DM9X_INT_PR)
|
||||
if (isr & DM9X_INT_PR)
|
||||
{
|
||||
dm9x_receive(dm9x);
|
||||
}
|
||||
|
||||
/* Check if we are able to transmit a packet */
|
||||
/* Check if we are able to transmit a packet */
|
||||
|
||||
if (isr & DM9X_INT_PT)
|
||||
if (isr & DM9X_INT_PT)
|
||||
{
|
||||
dm9x_txdone(dm9x);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1615,7 +1615,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv)
|
|||
enc_wrbreg(priv, ENC_ERXRDPTL, (priv->nextpkt));
|
||||
enc_wrbreg(priv, ENC_ERXRDPTH, (priv->nextpkt) >> 8);
|
||||
|
||||
/* Decrement the packet counter indicate we are done with this packet */
|
||||
/* Decrement the packet counter indicate we are done with this packet */
|
||||
|
||||
enc_bfsgreg(priv, ENC_ECON2, ECON2_PKTDEC);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -561,9 +561,9 @@ int localhost_initialize(void)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
net_ipv6addr_copy(priv->lo_dev.d_ipv6addr, g_lo_ipv6addr);
|
||||
net_ipv6addr_copy(priv->lo_dev.d_ipv6draddr, g_lo_ipv6addr);
|
||||
net_ipv6addr_copy(priv->lo_dev.d_ipv6netmask, g_ipv6_alloneaddr);
|
||||
net_ipv6addr_copy(priv->lo_dev.d_ipv6addr, g_lo_ipv6addr);
|
||||
net_ipv6addr_copy(priv->lo_dev.d_ipv6draddr, g_lo_ipv6addr);
|
||||
net_ipv6addr_copy(priv->lo_dev.d_ipv6netmask, g_ipv6_alloneaddr);
|
||||
#endif
|
||||
|
||||
/* Put the network in the UP state */
|
||||
|
|
|
|||
|
|
@ -183,9 +183,9 @@ struct slip_driver_s
|
|||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/* We really should get rid of CONFIG_NET_SLIP_NINTERFACES and, instead,
|
||||
* kmm_malloc() new interface instances as needed.
|
||||
*/
|
||||
/* We really should get rid of CONFIG_NET_SLIP_NINTERFACES and, instead,
|
||||
* kmm_malloc() new interface instances as needed.
|
||||
*/
|
||||
|
||||
static struct slip_driver_s g_slip[CONFIG_NET_SLIP_NINTERFACES];
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ static void pipecommon_pollnotify(FAR struct pipe_dev_s *dev, pollevent_t events
|
|||
|
||||
FAR struct pipe_dev_s *pipecommon_allocdev(void)
|
||||
{
|
||||
struct pipe_dev_s *dev;
|
||||
FAR struct pipe_dev_s *dev;
|
||||
|
||||
/* Allocate a private structure to manage the pipe */
|
||||
|
||||
|
|
|
|||
|
|
@ -792,7 +792,7 @@ static ssize_t uart_read(FAR struct file *filep, FAR char *buffer, size_t buflen
|
|||
nbuffered = rxbuf->size - rxbuf->tail + rxbuf->head;
|
||||
}
|
||||
|
||||
/* Is the level now below the watermark level that we need to report? */
|
||||
/* Is the level now below the watermark level that we need to report? */
|
||||
|
||||
watermark = (CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK * rxbuf->size) / 100;
|
||||
if (nbuffered <= watermark)
|
||||
|
|
@ -1170,7 +1170,7 @@ static int uart_close(FAR struct file *filep)
|
|||
|
||||
uart_givesem(&dev->closesem);
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: uart_open
|
||||
|
|
@ -1443,6 +1443,3 @@ void uart_connected(FAR uart_dev_t *dev, bool connected)
|
|||
irqrestore(flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -708,10 +708,10 @@ static int u16550_attach(struct uart_dev_s *dev)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void u16550_detach(struct uart_dev_s *dev)
|
||||
static void u16550_detach(FAR struct uart_dev_s *dev)
|
||||
{
|
||||
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
|
||||
struct u16550_s *priv = (struct u16550_s*)dev->priv;
|
||||
FAR struct u16550_s *priv = (struct u16550_s*)dev->priv;
|
||||
#ifndef CONFIG_ARCH_NOINTC
|
||||
up_disable_irq(priv->irq);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#ifdef CONFIG_SPI_BITBANG
|
||||
|
||||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
/* This file holds the static, device-independ portion of the generica SPI-
|
||||
|
|
|
|||
|
|
@ -426,14 +426,14 @@ static ssize_t ramlog_write(FAR struct file *filep, FAR const char *buffer, size
|
|||
DEBUGASSERT(inode && inode->i_private);
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Loop until all of the bytes have been written. This function may be
|
||||
* called from an interrupt handler! Semaphores cannot be used!
|
||||
*
|
||||
* The write logic only needs to modify the rl_head index. Therefore,
|
||||
* there is a difference in the way that rl_head and rl_tail are protected:
|
||||
* rl_tail is protected with a semaphore; rl_tail is protected by disabling
|
||||
* interrupts.
|
||||
*/
|
||||
/* Loop until all of the bytes have been written. This function may be
|
||||
* called from an interrupt handler! Semaphores cannot be used!
|
||||
*
|
||||
* The write logic only needs to modify the rl_head index. Therefore,
|
||||
* there is a difference in the way that rl_head and rl_tail are protected:
|
||||
* rl_tail is protected with a semaphore; rl_tail is protected by disabling
|
||||
* interrupts.
|
||||
*/
|
||||
|
||||
for (nwritten = 0; nwritten < len; nwritten++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ static int cs2100_read_reg(FAR const struct cs2100_config_s *config,
|
|||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -2202,7 +2202,7 @@ static void cdcuart_txint(FAR struct uart_dev_s *dev, bool enable)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Extract references to private data */
|
||||
/* Extract references to private data */
|
||||
|
||||
priv = (FAR struct cdcacm_dev_s*)dev->priv;
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ const char g_compvendorstr[] = CONFIG_COMPOSITE_VENDORSTR;
|
|||
const char g_compproductstr[] = CONFIG_COMPOSITE_PRODUCTSTR;
|
||||
const char g_compserialstr[] = CONFIG_COMPOSITE_SERIALSTR;
|
||||
|
||||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
/****************************************************************************
|
||||
|
|
|
|||
|
|
@ -2218,7 +2218,7 @@ static void usbser_txint(FAR struct uart_dev_s *dev, bool enable)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Extract references to private data */
|
||||
/* Extract references to private data */
|
||||
|
||||
priv = (FAR struct pl2303_dev_s*)dev->priv;
|
||||
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ int usbmsc_mkstrdesc(uint8_t id, struct usb_strdesc_s *strdesc)
|
|||
return 4;
|
||||
}
|
||||
|
||||
case USBMSC_MANUFACTURERSTRID:
|
||||
case USBMSC_MANUFACTURERSTRID:
|
||||
str = g_mscvendorstr;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -1712,7 +1712,7 @@ static void usbhost_putle16(uint8_t *dest, uint16_t val)
|
|||
|
||||
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
||||
{
|
||||
/* Little endian means LS halfword first in byte stream */
|
||||
/* Little endian means LS halfword first in byte stream */
|
||||
|
||||
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1783,7 +1783,7 @@ static void usbhost_putle16(uint8_t *dest, uint16_t val)
|
|||
|
||||
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
||||
{
|
||||
/* Little endian means LS halfword first in byte stream */
|
||||
/* Little endian means LS halfword first in byte stream */
|
||||
|
||||
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -742,7 +742,7 @@ static void usbhost_putle16(uint8_t *dest, uint16_t val)
|
|||
|
||||
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
||||
{
|
||||
/* Little endian means LS halfword first in byte stream */
|
||||
/* Little endian means LS halfword first in byte stream */
|
||||
|
||||
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1481,7 +1481,7 @@ static void usbhost_putbe16(uint8_t *dest, uint16_t val)
|
|||
|
||||
static inline uint32_t usbhost_getle32(const uint8_t *val)
|
||||
{
|
||||
/* Little endian means LS halfword first in byte stream */
|
||||
/* Little endian means LS halfword first in byte stream */
|
||||
|
||||
return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,10 +61,10 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Open the device/file write-only, try to create (file) it if it doesn't
|
||||
* exist, if the file that already exists, then append the new log data to
|
||||
* end of the file.
|
||||
*/
|
||||
/* Open the device/file write-only, try to create (file) it if it doesn't
|
||||
* exist, if the file that already exists, then append the new log data to
|
||||
* end of the file.
|
||||
*/
|
||||
|
||||
#define SYSLOG_OFLAGS (O_WRONLY | O_CREAT | O_APPEND)
|
||||
|
||||
|
|
@ -348,7 +348,7 @@ int syslog_initialize(void)
|
|||
g_sysdev.sl_state = SYSLOG_OPENED;
|
||||
return OK;
|
||||
|
||||
errout_with_inode:
|
||||
errout_with_inode:
|
||||
inode_release(inode);
|
||||
g_sysdev.sl_state = SYSLOG_FAILURE;
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ static inline int fat_parsesfname(const char **path,
|
|||
dirinfo->fd_name[ndx++] = ch;
|
||||
}
|
||||
|
||||
errout:
|
||||
errout:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -552,7 +552,7 @@ static inline int fat_parselfname(const char **path,
|
|||
dirinfo->fd_lfname[ndx++] = ch;
|
||||
}
|
||||
|
||||
errout:
|
||||
errout:
|
||||
dirinfo->fd_lfname[0] = '\0';
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -683,11 +683,11 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable)
|
|||
|
||||
return OK;
|
||||
|
||||
errout_with_buffer:
|
||||
errout_with_buffer:
|
||||
fat_io_free(fs->fs_buffer, fs->fs_hwsectorsize);
|
||||
fs->fs_buffer = 0;
|
||||
|
||||
errout:
|
||||
errout:
|
||||
fs->fs_mounted = false;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ static inline int mkfatfs_writembr(FAR struct fat_format_s *fmt,
|
|||
/* Write all of the reserved sectors */
|
||||
|
||||
memset(var->fv_sect, 0, var->fv_sectorsize);
|
||||
for (sectno = 1; sectno < fmt->ff_rsvdseccount && ret >= 0; sectno++)
|
||||
for (sectno = 1; sectno < fmt->ff_rsvdseccount && ret >= 0; sectno++)
|
||||
{
|
||||
ret = DEV_WRITE(var->fv_sect, sectno, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ static int mountpoint_filter(FAR struct inode *node,
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: foreach_mountpoint
|
||||
*
|
||||
* Description:
|
||||
|
|
|
|||
|
|
@ -381,11 +381,11 @@ int mount(FAR const char *source, FAR const char *target,
|
|||
mountpt_inode->i_private = fshandle;
|
||||
inode_semgive();
|
||||
|
||||
/* We can release our reference to the blkdrver_inode, if the filesystem
|
||||
* wants to retain the blockdriver inode (which it should), then it must
|
||||
* have called inode_addref(). There is one reference on mountpt_inode
|
||||
* that will persist until umount2() is called.
|
||||
*/
|
||||
/* We can release our reference to the blkdrver_inode, if the filesystem
|
||||
* wants to retain the blockdriver inode (which it should), then it must
|
||||
* have called inode_addref(). There is one reference on mountpt_inode
|
||||
* that will persist until umount2() is called.
|
||||
*/
|
||||
|
||||
#ifdef BDFS_SUPPORT
|
||||
#ifdef NONBDFS_SUPPORT
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ void nxffs_wrle16(uint8_t *dest, uint16_t val)
|
|||
|
||||
uint32_t nxffs_rdle32(FAR const uint8_t *val)
|
||||
{
|
||||
/* Little endian means LS halfword first in byte stream */
|
||||
/* Little endian means LS halfword first in byte stream */
|
||||
|
||||
return (uint32_t)nxffs_rdle16(&val[2]) << 16 | (uint32_t)nxffs_rdle16(val);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,9 +264,9 @@ FAR sem_t *sem_open (FAR const char *name, int oflags, ...)
|
|||
|
||||
return sem;
|
||||
|
||||
errout_with_inode:
|
||||
errout_with_inode:
|
||||
inode_release(inode);
|
||||
errout_with_lock:
|
||||
errout_with_lock:
|
||||
set_errno(errcode);
|
||||
sched_unlock();
|
||||
return (FAR sem_t *)ERROR;
|
||||
|
|
|
|||
|
|
@ -2444,7 +2444,7 @@ static int unionfs_stat(FAR struct inode *mountpt, FAR const char *relpath,
|
|||
|
||||
static int unionfs_getmount(FAR const char *path, FAR struct inode **inode)
|
||||
{
|
||||
FAR struct inode *minode;
|
||||
FAR struct inode *minode;
|
||||
|
||||
/* Find the mountpt */
|
||||
|
||||
|
|
|
|||
|
|
@ -181,9 +181,9 @@ int mkdir(const char *pathname, mode_t mode)
|
|||
|
||||
return OK;
|
||||
|
||||
errout_with_inode:
|
||||
errout_with_inode:
|
||||
inode_release(inode);
|
||||
errout:
|
||||
errout:
|
||||
set_errno(errcode);
|
||||
return ERROR;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,11 +201,11 @@ int open(const char *path, int oflags, ...)
|
|||
|
||||
return fd;
|
||||
|
||||
errout_with_fd:
|
||||
errout_with_fd:
|
||||
files_release(fd);
|
||||
errout_with_inode:
|
||||
errout_with_inode:
|
||||
inode_release(inode);
|
||||
errout:
|
||||
errout:
|
||||
set_errno(ret);
|
||||
return ERROR;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -245,12 +245,12 @@ int rename(FAR const char *oldpath, FAR const char *newpath)
|
|||
return OK;
|
||||
|
||||
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
||||
errout_with_newinode:
|
||||
errout_with_newinode:
|
||||
inode_release(newinode);
|
||||
#endif
|
||||
errout_with_oldinode:
|
||||
errout_with_oldinode:
|
||||
inode_release(oldinode);
|
||||
errout:
|
||||
errout:
|
||||
set_errno(errcode);
|
||||
return ERROR;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,9 +225,9 @@ int unlink(FAR const char *pathname)
|
|||
inode_release(inode);
|
||||
return OK;
|
||||
|
||||
errout_with_inode:
|
||||
errout_with_inode:
|
||||
inode_release(inode);
|
||||
errout:
|
||||
errout:
|
||||
set_errno(errcode);
|
||||
return ERROR;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ int nx_mousein(NXHANDLE handle, nxgl_coord_t x, nxgl_coord_t y, uint8_t buttons)
|
|||
y = g_mrange.y - 1;
|
||||
}
|
||||
|
||||
/* Look any change in values */
|
||||
/* Look any change in values */
|
||||
|
||||
if (x != g_mpos.x || y != g_mpos.y || buttons != g_mbutton)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ static inline int nxsu_setup(FAR NX_DRIVERTYPE *dev,
|
|||
|
||||
fe->be.topwnd = &fe->be.bkgd;
|
||||
|
||||
/* Initialize the mouse position */
|
||||
/* Initialize the mouse position */
|
||||
|
||||
#ifdef CONFIG_NX_XYINPUT
|
||||
nxsu_mouseinit(fe->be.vinfo.xres, fe->be.vinfo.yres);
|
||||
|
|
|
|||
|
|
@ -418,14 +418,14 @@ void nxterm_kbdin(NXTERM handle, FAR const uint8_t *buffer, uint8_t buflen)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Loop until all of the bytes have been written. This function may be
|
||||
* called from an interrupt handler! Semaphores cannot be used!
|
||||
*
|
||||
* The write logic only needs to modify the head index. Therefore,
|
||||
* there is a difference in the way that head and tail are protected:
|
||||
* tail is protected with a semaphore; tail is protected by disabling
|
||||
* interrupts.
|
||||
*/
|
||||
/* Loop until all of the bytes have been written. This function may be
|
||||
* called from an interrupt handler! Semaphores cannot be used!
|
||||
*
|
||||
* The write logic only needs to modify the head index. Therefore,
|
||||
* there is a difference in the way that head and tail are protected:
|
||||
* tail is protected with a semaphore; tail is protected by disabling
|
||||
* interrupts.
|
||||
*/
|
||||
|
||||
for (nwritten = 0; nwritten < buflen; nwritten++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -144,17 +144,17 @@ b16_t b16mulb16(b16_t m1, b16_t m2)
|
|||
|
||||
ub16_t ub16mulub16(ub16_t m1, ub16_t m2)
|
||||
{
|
||||
/* Let:
|
||||
*
|
||||
* m1 = m1i*2**16 + m1f (b16)
|
||||
* m2 = m2i*2**16 + m2f (b16)
|
||||
*
|
||||
* Then:
|
||||
*
|
||||
* m1*m2 = (m1i*m2i)*2**32 + (m1i*m2f + m2i*m1f)*2**16 + m1f*m2f (b32)
|
||||
* = (m1i*m2i)*2**16 + (m1i*m2f + m2i*m1f) + m1f*m2f*2**-16 (b16)
|
||||
* = a*2**16 + b + c*2**-16
|
||||
*/
|
||||
/* Let:
|
||||
*
|
||||
* m1 = m1i*2**16 + m1f (b16)
|
||||
* m2 = m2i*2**16 + m2f (b16)
|
||||
*
|
||||
* Then:
|
||||
*
|
||||
* m1*m2 = (m1i*m2i)*2**32 + (m1i*m2f + m2i*m1f)*2**16 + m1f*m2f (b32)
|
||||
* = (m1i*m2i)*2**16 + (m1i*m2f + m2i*m1f) + m1f*m2f*2**-16 (b16)
|
||||
* = a*2**16 + b + c*2**-16
|
||||
*/
|
||||
|
||||
uint32_t m1i = ((uint32_t)m1 >> 16);
|
||||
uint32_t m2i = ((uint32_t)m1 >> 16);
|
||||
|
|
@ -195,15 +195,15 @@ b16_t b16sqr(b16_t a)
|
|||
|
||||
ub16_t ub16sqr(ub16_t a)
|
||||
{
|
||||
/* Let:
|
||||
*
|
||||
* m = mi*2**16 + mf (b16)
|
||||
*
|
||||
* Then:
|
||||
*
|
||||
* m*m = (mi*mi)*2**32 + 2*(m1*m2)*2**16 + mf*mf (b32)
|
||||
* = (mi*mi)*2**16 + 2*(mi*mf) + mf*mf*2**-16 (b16)
|
||||
*/
|
||||
/* Let:
|
||||
*
|
||||
* m = mi*2**16 + mf (b16)
|
||||
*
|
||||
* Then:
|
||||
*
|
||||
* m*m = (mi*mi)*2**32 + 2*(m1*m2)*2**16 + mf*mf (b32)
|
||||
* = (mi*mi)*2**16 + 2*(mi*mf) + mf*mf*2**-16 (b16)
|
||||
*/
|
||||
|
||||
uint32_t mi = ((uint32_t)a >> 16);
|
||||
uint32_t mf = ((uint32_t)a & 0x0000ffff);
|
||||
|
|
@ -235,16 +235,16 @@ ub16_t ub16divub16(ub16_t num, ub16_t denom)
|
|||
uint32_t numf;
|
||||
uint32_t product;
|
||||
|
||||
/* Let:
|
||||
*
|
||||
* num = numi*2**16 + numf (b16)
|
||||
* den = deni*2**16 + denf (b16)
|
||||
*
|
||||
* Then:
|
||||
*
|
||||
* num/den = numi*2**16 / den + numf / den (b0)
|
||||
* = numi*2**32 / den + numf*2**16 /den (b16)
|
||||
*/
|
||||
/* Let:
|
||||
*
|
||||
* num = numi*2**16 + numf (b16)
|
||||
* den = deni*2**16 + denf (b16)
|
||||
*
|
||||
* Then:
|
||||
*
|
||||
* num/den = numi*2**16 / den + numf / den (b0)
|
||||
* = numi*2**32 / den + numf*2**16 /den (b16)
|
||||
*/
|
||||
|
||||
/* Check for overflow in the first part of the quotient */
|
||||
|
||||
|
|
|
|||
|
|
@ -121,6 +121,6 @@ int uname(FAR struct utsname *name)
|
|||
name->machine[SYS_NAMELEN-1] = '\0';
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* (!CONFIG_BUILD_PROTECTED) && !CONFIG_BUILD_KERNEL) || __KERNEL__ */
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ errorout_with_herrnocode:
|
|||
*h_errnop = herrnocode;
|
||||
}
|
||||
|
||||
return ERROR;
|
||||
return ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -341,7 +341,7 @@ errorout_with_herrnocode:
|
|||
*h_errnop = herrnocode;
|
||||
}
|
||||
|
||||
return ERROR;
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ static int lib_numeric_address(FAR const char *name, FAR struct hostent *host,
|
|||
* be big enough).
|
||||
*/
|
||||
|
||||
if (buflen <= sizeof(struct hostent_info_s))
|
||||
if (buflen <= sizeof(struct hostent_info_s))
|
||||
{
|
||||
return -ERANGE;
|
||||
}
|
||||
|
|
@ -335,7 +335,7 @@ static int lib_find_answer(FAR const char *name, FAR struct hostent *host,
|
|||
* be big enough).
|
||||
*/
|
||||
|
||||
if (buflen <= sizeof(struct hostent_info_s))
|
||||
if (buflen <= sizeof(struct hostent_info_s))
|
||||
{
|
||||
return -ERANGE;
|
||||
}
|
||||
|
|
@ -360,7 +360,7 @@ static int lib_find_answer(FAR const char *name, FAR struct hostent *host,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* Get the address type; verify the address size. */
|
||||
/* Get the address type; verify the address size. */
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
|
|
@ -479,7 +479,7 @@ static int lib_dns_lookup(FAR const char *name, FAR struct hostent *host,
|
|||
* be big enough).
|
||||
*/
|
||||
|
||||
if (buflen <= sizeof(struct hostent_info_s))
|
||||
if (buflen <= sizeof(struct hostent_info_s))
|
||||
{
|
||||
return -ERANGE;
|
||||
}
|
||||
|
|
@ -676,7 +676,7 @@ errorout_with_herrnocode:
|
|||
*h_errnop = herrnocode;
|
||||
}
|
||||
|
||||
return ERROR;
|
||||
return ERROR;
|
||||
}
|
||||
#endif /* CONFIG_NETDB_HOSTFILE */
|
||||
|
||||
|
|
@ -793,7 +793,7 @@ int gethostbyname_r(FAR const char *name, FAR struct hostent *host,
|
|||
*h_errnop = HOST_NOT_FOUND;
|
||||
}
|
||||
|
||||
return ERROR;
|
||||
return ERROR;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ ssize_t lib_parse_hostfile(FAR FILE *stream, FAR struct hostent *host,
|
|||
* be big enough).
|
||||
*/
|
||||
|
||||
if (buflen <= sizeof(struct hostent_info_s))
|
||||
if (buflen <= sizeof(struct hostent_info_s))
|
||||
{
|
||||
return -ERANGE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ void (*sigset(int signo, void (*disp)(int)))(int)
|
|||
* indicate the error.
|
||||
*/
|
||||
|
||||
if (ret == OK)
|
||||
if (ret == OK)
|
||||
{
|
||||
return oact.sa_handler;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ static int stdinstream_getc(FAR struct lib_instream_s *this)
|
|||
this->nget++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ static int stdsistream_getc(FAR struct lib_sistream_s *this)
|
|||
this->nget++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ int settimeofday(FAR const struct timeval *tv, FAR struct timezone *tz)
|
|||
|
||||
/* Convert the timeval to a timespec */
|
||||
|
||||
ts.tv_sec = tv->tv_sec;
|
||||
ts.tv_nsec = tv->tv_usec * NSEC_PER_USEC;
|
||||
ts.tv_sec = tv->tv_sec;
|
||||
ts.tv_nsec = tv->tv_usec * NSEC_PER_USEC;
|
||||
|
||||
/* Let clock_settime do the work */
|
||||
|
||||
|
|
|
|||
|
|
@ -64,14 +64,14 @@
|
|||
#if 0
|
||||
static inline void _trimdir(char *path)
|
||||
{
|
||||
/* Skip any trailing '/' characters (unless it is also the leading '/') */
|
||||
/* Skip any trailing '/' characters (unless it is also the leading '/') */
|
||||
|
||||
int len = strlen(path) - 1;
|
||||
while (len > 0 && path[len] == '/')
|
||||
{
|
||||
int len = strlen(path) - 1;
|
||||
while (len > 0 && path[len] == '/')
|
||||
{
|
||||
path[len] = '\0';
|
||||
len--;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define _trimdir(p)
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
* of the attached shared memory segment and return 0.
|
||||
*
|
||||
* Otherwise, the shared memory segment will not be detached, shmdt()
|
||||
& will return -1, and errno will be set to indicate the error.
|
||||
* will return -1, and errno will be set to indicate the error.
|
||||
*
|
||||
* - EINVAL
|
||||
* The value of shmaddr is not the data segment start address of a
|
||||
|
|
|
|||
|
|
@ -178,8 +178,8 @@ void arp_out(FAR struct net_driver_s *dev)
|
|||
* addresses=0xff (ff00::/8.)
|
||||
*/
|
||||
|
||||
else if (NTOHS(pip->eh_destipaddr[0]) >= 0xe000 &&
|
||||
NTOHS(pip->eh_destipaddr[0]) <= 0xefff)
|
||||
else if (NTOHS(pip->eh_destipaddr[0]) >= 0xe000 &&
|
||||
NTOHS(pip->eh_destipaddr[0]) <= 0xefff)
|
||||
{
|
||||
/* Build the well-known IPv4 IGMP Ethernet address. The first
|
||||
* three bytes are fixed; the final three variable come from the
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ int arp_send(in_addr_t ipaddr)
|
|||
* addresses=0xff (ff00::/8.)
|
||||
*/
|
||||
|
||||
if (NTOHL(ipaddr) >= 0xe0000000 && NTOHL(ipaddr) <= 0xefffffff)
|
||||
if (NTOHL(ipaddr) >= 0xe0000000 && NTOHL(ipaddr) <= 0xefffffff)
|
||||
{
|
||||
/* We don't need to send the ARP request */
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ void arp_timer_initialize(void)
|
|||
/* Create and start the ARP timer */
|
||||
|
||||
g_arptimer = wd_create();
|
||||
(void)wd_start(g_arptimer, ARPTIMER_WDINTERVAL, arptimer_poll, 0);
|
||||
(void)wd_start(g_arptimer, ARPTIMER_WDINTERVAL, arptimer_poll, 0);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET_ARP */
|
||||
|
|
|
|||
|
|
@ -301,9 +301,9 @@ static int icmpv6_wait_radvertise(FAR struct net_driver_s *dev,
|
|||
|
||||
ret = icmpv6_rwait(notify, &delay);
|
||||
|
||||
/* icmpv6_wait will return OK if and only if the matching Router
|
||||
* Advertisement is received. Otherwise, it will return -ETIMEDOUT.
|
||||
*/
|
||||
/* icmpv6_wait will return OK if and only if the matching Router
|
||||
* Advertisement is received. Otherwise, it will return -ETIMEDOUT.
|
||||
*/
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -368,9 +368,9 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev)
|
|||
|
||||
/* The interface should be in the down state */
|
||||
|
||||
save = net_lock();
|
||||
netdev_ifdown(dev);
|
||||
net_unlock(save);
|
||||
save = net_lock();
|
||||
netdev_ifdown(dev);
|
||||
net_unlock(save);
|
||||
|
||||
/* IPv6 Stateless Autoconfiguration
|
||||
* Reference: http://www.tcpipguide.com/free/t_IPv6AutoconfigurationandRenumbering.htm
|
||||
|
|
|
|||
|
|
@ -199,10 +199,10 @@ int main(int argc, char **argv)
|
|||
|
||||
void my_assert(bool value)
|
||||
{
|
||||
if (!value)
|
||||
{
|
||||
fprintf(stderr, "Assertion failed\n");
|
||||
if (!value)
|
||||
{
|
||||
fprintf(stderr, "Assertion failed\n");
|
||||
|
||||
abort();
|
||||
}
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
void local_initialize(void)
|
||||
void local_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_NET_LOCAL_STREAM
|
||||
dq_init(&g_local_listeners);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ int net_dupsd(int sockfd, int minsd)
|
|||
|
||||
psock1 = sockfd_socket(sockfd);
|
||||
|
||||
/* Verify that the sockfd corresponds to valid, allocated socket */
|
||||
/* Verify that the sockfd corresponds to valid, allocated socket */
|
||||
|
||||
if (!psock1 || psock1->s_crefs <= 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -744,15 +744,15 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset,
|
|||
|
||||
tcp_callback_free(conn, state.snd_ackcb);
|
||||
|
||||
errout_datacb:
|
||||
errout_datacb:
|
||||
tcp_callback_free(conn, state.snd_datacb);
|
||||
|
||||
errout_locked:
|
||||
errout_locked:
|
||||
|
||||
sem_destroy(&state. snd_sem);
|
||||
net_unlock(save);
|
||||
|
||||
errout:
|
||||
errout:
|
||||
|
||||
if (err)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -265,8 +265,8 @@ static inline void recvfrom_newtcpdata(FAR struct net_driver_s *dev,
|
|||
* add it to the read-ahead buffers.
|
||||
*/
|
||||
|
||||
if (recvlen < dev->d_len)
|
||||
{
|
||||
if (recvlen < dev->d_len)
|
||||
{
|
||||
#ifdef CONFIG_NET_TCP_READAHEAD
|
||||
FAR struct tcp_conn_s *conn = (FAR struct tcp_conn_s *)pstate->rf_sock->s_conn;
|
||||
FAR uint8_t *buffer = (FAR uint8_t *)dev->d_appdata + recvlen;
|
||||
|
|
|
|||
|
|
@ -185,9 +185,9 @@ static int psock_local_alloc(FAR struct socket *psock)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* Set the reference count on the connection structure. This reference
|
||||
* count will be incremented only if the socket is dup'ed
|
||||
*/
|
||||
/* Set the reference count on the connection structure. This reference
|
||||
* count will be incremented only if the socket is dup'ed
|
||||
*/
|
||||
|
||||
DEBUGASSERT(conn->lc_crefs == 0);
|
||||
conn->lc_crefs = 1;
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
|
|||
}
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
|
||||
/* If the application has data to be sent, or if the incoming packet had
|
||||
/* If the application has data to be sent, or if the incoming packet had
|
||||
* new data in it, we must send out a packet.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ void tcp_ipv4_select(FAR struct net_driver_s *dev)
|
|||
|
||||
IFF_SET_IPv4(dev->d_flags);
|
||||
|
||||
/* Set the offset to the beginning of the TCP data payload */
|
||||
/* Set the offset to the beginning of the TCP data payload */
|
||||
|
||||
dev->d_appdata = &dev->d_buf[IPv4TCP_HDRLEN + NET_LL_HDRLEN(dev)];
|
||||
dev->d_appdata = &dev->d_buf[IPv4TCP_HDRLEN + NET_LL_HDRLEN(dev)];
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
|
||||
|
|
@ -97,9 +97,9 @@ void tcp_ipv6_select(FAR struct net_driver_s *dev)
|
|||
|
||||
IFF_SET_IPv6(dev->d_flags);
|
||||
|
||||
/* Set the offset to the beginning of the TCP data payload */
|
||||
/* Set the offset to the beginning of the TCP data payload */
|
||||
|
||||
dev->d_appdata = &dev->d_buf[IPv6TCP_HDRLEN + NET_LL_HDRLEN(dev)];
|
||||
dev->d_appdata = &dev->d_buf[IPv6TCP_HDRLEN + NET_LL_HDRLEN(dev)];
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
|
||||
|
|
|
|||
|
|
@ -589,7 +589,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
|
|||
conn->expired++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Move all segments that have been sent but not ACKed to the write
|
||||
* queue again note, the un-ACKed segments are put at the head of the
|
||||
* write_q so they can be resent as soon as possible.
|
||||
|
|
@ -726,7 +726,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
|
|||
* retransmitting, then the sequence number will already
|
||||
* be set for this write buffer.
|
||||
*/
|
||||
|
||||
|
||||
if (WRB_SEQNO(wrb) == (unsigned)-1)
|
||||
{
|
||||
WRB_SEQNO(wrb) = conn->isn + conn->sent;
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev,
|
|||
/* Fall through to re-send data from the last that was ACKed */
|
||||
}
|
||||
|
||||
/* Check for a loss of connection */
|
||||
/* Check for a loss of connection */
|
||||
|
||||
else if ((flags & TCP_DISCONN_EVENTS) != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -77,9 +77,9 @@ void udp_ipv4_select(FAR struct net_driver_s *dev)
|
|||
|
||||
IFF_SET_IPv4(dev->d_flags);
|
||||
|
||||
/* Set the offset to the beginning of the UDP data payload */
|
||||
/* Set the offset to the beginning of the UDP data payload */
|
||||
|
||||
dev->d_appdata = &dev->d_buf[IPv4UDP_HDRLEN + NET_LL_HDRLEN(dev)];
|
||||
dev->d_appdata = &dev->d_buf[IPv4UDP_HDRLEN + NET_LL_HDRLEN(dev)];
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
|
||||
|
|
@ -98,9 +98,9 @@ void udp_ipv6_select(FAR struct net_driver_s *dev)
|
|||
|
||||
IFF_SET_IPv6(dev->d_flags);
|
||||
|
||||
/* Set the offset to the beginning of the UDP data payload */
|
||||
/* Set the offset to the beginning of the UDP data payload */
|
||||
|
||||
dev->d_appdata = &dev->d_buf[IPv6UDP_HDRLEN + NET_LL_HDRLEN(dev)];
|
||||
dev->d_appdata = &dev->d_buf[IPv6UDP_HDRLEN + NET_LL_HDRLEN(dev)];
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ static int group_killchildren_handler(pid_t pid, FAR void *arg)
|
|||
ret = pthread_cancel(pid);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
|
|
@ -271,9 +271,9 @@ static unsigned int sched_timer_process(unsigned int ticks, bool noswitches)
|
|||
rettime = tmp;
|
||||
}
|
||||
|
||||
/* Check for operations specific to scheduling policy of the currently
|
||||
* active task.
|
||||
*/
|
||||
/* Check for operations specific to scheduling policy of the currently
|
||||
* active task.
|
||||
*/
|
||||
|
||||
tmp = sched_process_scheduler(ticks, noswitches);
|
||||
if (tmp > 0 && tmp < cmptime)
|
||||
|
|
|
|||
|
|
@ -780,7 +780,7 @@ static inline void sem_restorebaseprio_task(FAR struct tcb_s *stcb,
|
|||
void sem_initholders(void)
|
||||
{
|
||||
#if CONFIG_SEM_PREALLOCHOLDERS > 0
|
||||
int i;
|
||||
int i;
|
||||
|
||||
/* Put all of the pre-allocated holder structures into the free list */
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ int task_init(FAR struct tcb_s *tcb, const char *name, int priority,
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Associate file descriptors with the new task */
|
||||
/* Associate file descriptors with the new task */
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
ret = group_setuptaskfiles(ttcb);
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ errout:
|
|||
|
||||
static int task_spawn_proxy(int argc, FAR char *argv[])
|
||||
{
|
||||
int ret;
|
||||
int ret;
|
||||
|
||||
/* Perform file actions and/or set a custom signal mask. We get here only
|
||||
* if the file_actions parameter to task_spawn[p] was non-NULL and/or the
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ static const char *dequote_list[] =
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/* Skip over any spaces */
|
||||
/* Skip over any spaces */
|
||||
|
||||
static char *skip_space(char *ptr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ char line[LINESIZE+1];
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/* Skip over any spaces */
|
||||
/* Skip over any spaces */
|
||||
|
||||
static char *skip_space(char *ptr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static inline char *getfilepath(const char *name)
|
||||
static inline char *getfilepath(const char *name)
|
||||
{
|
||||
snprintf(line, PATH_MAX, "%s/" DEFCONFIG, name);
|
||||
line[PATH_MAX] = '\0';
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ static char g_command[MAX_BUFFER];
|
|||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/* MinGW does not seem to provide strtok_r */
|
||||
/* MinGW does not seem to provide strtok_r */
|
||||
|
||||
#ifndef HAVE_STRTOK_R
|
||||
static char *MY_strtok_r(char *str, const char *delim, char **saveptr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue