sim: Appease nxstyle errors

This commit is contained in:
YAMAMOTO Takashi 2020-03-25 11:04:24 +09:00 committed by Xiang Xiao
parent f19355132a
commit 2991836ee8
13 changed files with 45 additions and 36 deletions

View File

@ -82,7 +82,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
//sinfo("Blocking TCB=%p\n", tcb);
/* sinfo("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 most likely case), then a
@ -128,8 +128,8 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
sinfo("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
* driven environment.
* a kludge. This would be unsafe in a truly multi-threaded,
* interrupt driven environment.
*/
if (rtcb->xcp.sigdeliver)

View File

@ -53,8 +53,8 @@
* Pre-processor Macros
****************************************************************************/
/* Use a stack alignment of 16 bytes. If necessary frame_size must be rounded
* up to the next boundary
/* Use a stack alignment of 16 bytes. If necessary frame_size must be
* rounded up to the next boundary
*/
#define STACK_ALIGNMENT 16

View File

@ -56,7 +56,8 @@ static int devconsole_setup(FAR struct uart_dev_s *dev);
static void devconsole_shutdown(FAR struct uart_dev_s *dev);
static int devconsole_attach(FAR struct uart_dev_s *dev);
static void devconsole_detach(FAR struct uart_dev_s *dev);
static int devconsole_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
static int devconsole_ioctl(FAR struct file *filep, int cmd,
unsigned long arg);
static int devconsole_receive(FAR struct uart_dev_s *dev, uint32_t *status);
static void devconsole_rxint(FAR struct uart_dev_s *dev, bool enable);
static bool devconsole_rxavailable(FAR struct uart_dev_s *dev);
@ -140,14 +141,15 @@ static void devconsole_shutdown(struct uart_dev_s *dev)
* Name: devconsole_attach
*
* Description:
* Configure the UART to operation in interrupt driven mode. This method is
* called when the serial port is opened. Normally, this is just after the
* Configure the UART to operation in interrupt driven mode. This method
* is called when the serial port is opened. Normally, this is just after
* the setup() method is called, however, the serial console may operate in
* a non-interrupt driven mode during the boot phase.
*
* RX and TX interrupts are not enabled when by the attach method (unless the
* hardware supports multiple levels of interrupt enabling). The RX and TX
* interrupts are not enabled until the txint() and rxint() methods are called.
* RX and TX interrupts are not enabled when by the attach method (unless
* the hardware supports multiple levels of interrupt enabling). The RX
* and TX interrupts are not enabled until the txint() and rxint() methods
* are called.
*
****************************************************************************/
@ -161,8 +163,8 @@ static int devconsole_attach(struct uart_dev_s *dev)
*
* Description:
* Detach UART interrupts. This method is called when the serial port is
* closed normally just before the shutdown method is called. The exception is
* the serial console which is never shutdown.
* closed normally just before the shutdown method is called. The
* exception is the serial console which is never shutdown.
*
****************************************************************************/

View File

@ -193,7 +193,7 @@ int host_close(int fd)
* Name: host_read
****************************************************************************/
ssize_t host_read(int fd, void* buf, size_t count)
ssize_t host_read(int fd, void *buf, size_t count)
{
/* Just call the read routine */
@ -296,7 +296,7 @@ void *host_opendir(const char *name)
* Name: host_readdir
****************************************************************************/
int host_readdir(void* dirp, struct nuttx_dirent_s* entry)
int host_readdir(void *dirp, struct nuttx_dirent_s *entry)
{
struct dirent *ent;

View File

@ -59,5 +59,6 @@
bool up_interrupt_context(void)
{
/* The simulation is never in the interrupt state */
return false;
}

View File

@ -1,7 +1,8 @@
/****************************************************************************
* arch/sim/src/sim/up_netdriver.c
*
* Copyright (C) 2007, 2009-2012, 2015-2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2009-2012, 2015-2016 Gregory Nutt.
* All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Based on code from uIP which also has a BSD-like license:
@ -82,8 +83,8 @@ static struct net_driver_s g_sim_dev;
static void netdriver_reply(FAR struct net_driver_s *dev)
{
/* If the receiving resulted in data that should be sent out on the network,
* the field d_len is set to a value > 0.
/* If the receiving resulted in data that should be sent out on
* the network, the field d_len is set to a value > 0.
*/
if (dev->d_len > 0)
@ -259,8 +260,8 @@ static int netdriver_txpoll(FAR struct net_driver_s *dev)
}
}
/* If zero is returned, the polling will continue until all connections have
* been examined.
/* If zero is returned, the polling will continue until all connections
* have been examined.
*/
return 0;

View File

@ -71,6 +71,7 @@ void up_release_pending(void)
/* Merge the g_pendingtasks list into the ready-to-run task list */
/* sched_lock(); */
if (sched_mergepending())
{
/* The currently active task has changed! We will need to switch
@ -96,8 +97,8 @@ void up_release_pending(void)
sinfo("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
* driven environment.
* a kludge. This would be unsafe in a truly multi-threaded,
* interrupt driven environment.
*/
if (rtcb->xcp.sigdeliver)

View File

@ -138,7 +138,8 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
/* Copy the exception context into the TCB at the (old) head of the
* ready-to-run Task list. if up_setjmp returns a non-zero
* value, then this is really the previously running task restarting!
* value, then this is really the previously running task
* restarting!
*/
if (!up_setjmp(rtcb->xcp.regs))
@ -151,8 +152,8 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
sinfo("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
* driven environment.
* a kludge. This would be unsafe in a truly multi-threaded,
* interrupt driven environment.
*/
if (rtcb->xcp.sigdeliver)

View File

@ -73,8 +73,8 @@
* lie in FLASH (string arguments for %s are still assumed to reside in
* SRAM). And (2), the string argument to puts and fputs is assumed to
* reside in FLASH. Clearly, these assumptions may have to modified for
* the particular needs of your environment. There is no "one-size-fits-all"
* solution for this problem.
* the particular needs of your environment. There is no
* "one-size-fits-all" solution for this problem.
*
****************************************************************************/

View File

@ -70,7 +70,8 @@ static void setrawmode(void)
memcpy(&raw, &g_cooked, sizeof(struct termios));
raw.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON);
raw.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR |
ICRNL | IXON);
raw.c_oflag &= ~OPOST;
raw.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
raw.c_cflag &= ~(CSIZE | PARENB);

View File

@ -53,8 +53,8 @@
* Pre-processor Macros
****************************************************************************/
/* Use a stack alignment of 16 bytes. If necessary frame_size must be rounded
* up to the next boundary
/* Use a stack alignment of 16 bytes. If necessary frame_size must be
* rounded up to the next boundary
*/
#define STACK_ALIGNMENT 16

View File

@ -1,7 +1,8 @@
/****************************************************************************
* arch/sim/src/sim/up_unblocktask.c
*
* Copyright (C) 2007-2009, 2013, 2015-2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2013, 2015-2016 Gregory Nutt.
* All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -90,6 +91,7 @@ void up_unblock_task(FAR struct tcb_s *tcb)
if (sched_addreadytorun(tcb))
{
/* The currently active task has changed! */
/* Update scheduler parameters */
sched_suspend_scheduler(rtcb);
@ -110,8 +112,8 @@ void up_unblock_task(FAR struct tcb_s *tcb)
sinfo("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
* driven environment.
* a kludge. This would be unsafe in a truly multi-threaded,
* interrupt driven environment.
*/
if (rtcb->xcp.sigdeliver)
@ -128,6 +130,6 @@ void up_unblock_task(FAR struct tcb_s *tcb)
/* Then switch contexts */
up_longjmp(rtcb->xcp.regs, 1);
}
}
}
}

View File

@ -52,8 +52,8 @@
* Pre-processor Macros
****************************************************************************/
/* Use a stack alignment of 16 bytes. If necessary frame_size must be rounded
* up to the next boundary
/* Use a stack alignment of 16 bytes. If necessary frame_size must be
* rounded up to the next boundary
*/
#define STACK_ALIGNMENT 16