More trailing whilespace removal

This commit is contained in:
Gregory Nutt
2014-04-13 16:22:22 -06:00
parent b7c65adeca
commit 25d4ff745b
450 changed files with 1474 additions and 1476 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ struct xcptcontext
uint8_t nbytes; uint8_t nbytes;
/* This is the saved stack. Space is allocated for the /* This is the saved stack. Space is allocated for the
* entire 256 byte IRAM (minus register and bit usage at * entire 256 byte IRAM (minus register and bit usage at
* the beginning). * the beginning).
*/ */
+2 -2
View File
@@ -33,8 +33,8 @@
* *
************************************************************/ ************************************************************/
#ifndef __ARCH_8051_INCLUDE_LIMITS_H #ifndef __ARCH_8051_INCLUDE_LIMITS_H
#define __ARCH_8051_INCLUDE_LIMITS_H #define __ARCH_8051_INCLUDE_LIMITS_H
/************************************************************ /************************************************************
* Included Files * Included Files
+2 -2
View File
@@ -37,8 +37,8 @@
* only indirectly through sys/types.h * only indirectly through sys/types.h
*/ */
#ifndef __ARCH_8051_INCLUDE_TYPES_H #ifndef __ARCH_8051_INCLUDE_TYPES_H
#define __ARCH_8051_INCLUDE_TYPES_H #define __ARCH_8051_INCLUDE_TYPES_H
/************************************************************************ /************************************************************************
* Included Files * Included Files
+1 -1
View File
@@ -200,7 +200,7 @@ up_mem.h: pass1.mem
libarch$(LIBEXT): up_mem.h $(OBJS) libarch$(LIBEXT): up_mem.h $(OBJS)
$(call ARCHIVE, $@, $(OBJS)) $(call ARCHIVE, $@, $(OBJS))
# This builds the libboard library in the board/ subdirectory # This builds the libboard library in the board/ subdirectory
board/libboard$(LIBEXT): board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
+2 -2
View File
@@ -131,7 +131,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state)
up_saveirqcontext(&tcb->xcp); up_saveirqcontext(&tcb->xcp);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
@@ -152,7 +152,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state)
else if (!up_savecontext(&rtcb->xcp)) else if (!up_savecontext(&rtcb->xcp))
{ {
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
+2 -2
View File
@@ -178,7 +178,7 @@ _up_timer0:
push ie push ie
clr ea clr ea
/* Save the remaining registers with interrupts disabled /* Save the remaining registers with interrupts disabled
* *
* a, ie, and dptr go on the stack. * a, ie, and dptr go on the stack.
*/ */
@@ -232,7 +232,7 @@ _up_interrupt:
push ie push ie
clr ea clr ea
/* Save the remaining registers with interrupts disabled /* Save the remaining registers with interrupts disabled
* *
* a, ie, and dptr go on the stack. * a, ie, and dptr go on the stack.
*/ */
+1 -1
View File
@@ -86,7 +86,7 @@ FAR struct xcptcontext *g_irqcontext;
* to comput them. * to comput them.
*/ */
const uint8_t g_ntobit[8] = const uint8_t g_ntobit[8] =
{ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
/************************************************************************ /************************************************************************
+1 -1
View File
@@ -72,7 +72,7 @@ bool g_irqtest;
volatile uint8_t g_irqtos; volatile uint8_t g_irqtos;
uint8_t g_irqregs[REGS_SIZE]; uint8_t g_irqregs[REGS_SIZE];
int g_nirqs; int g_nirqs;
FAR struct xcptcontext *g_irqcontext; FAR struct xcptcontext *g_irqcontext;
/************************************************************************ /************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -76,6 +76,6 @@ int up_putc(int ch)
{ {
_up_putc('\r'); _up_putc('\r');
} }
return ch; return ch;
} }
+3 -3
View File
@@ -98,7 +98,7 @@ void up_release_pending(void)
up_saveirqcontext(&rtcb->xcp); up_saveirqcontext(&rtcb->xcp);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
@@ -114,13 +114,13 @@ void up_release_pending(void)
/* Copy the exception context into the TCB of the task that /* Copy the exception context into the TCB of the task that
* was currently active. if up_savecontext returns a non-zero * was currently active. if up_savecontext returns a non-zero
* value, then this is really the previously running task * value, then this is really the previously running task
* restarting! * restarting!
*/ */
else if (!up_savecontext(&rtcb->xcp)) else if (!up_savecontext(&rtcb->xcp))
{ {
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
+3 -3
View File
@@ -70,7 +70,7 @@
* *
* Description: * Description:
* Called when the priority of a running or * Called when the priority of a running or
* ready-to-run task changes and the reprioritization will * ready-to-run task changes and the reprioritization will
* cause a context switch. Two cases: * cause a context switch. Two cases:
* *
* 1) The priority of the currently running task drops and the next * 1) The priority of the currently running task drops and the next
@@ -153,7 +153,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority)
up_saveirqcontext(&tcb->xcp); up_saveirqcontext(&tcb->xcp);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
@@ -174,7 +174,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority)
else if (!up_savecontext(&rtcb->xcp)) else if (!up_savecontext(&rtcb->xcp))
{ {
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
+1 -1
View File
@@ -276,7 +276,7 @@ void up_restorecontext(FAR struct xcptcontext *context) __naked
/* Restore registers from the new stack */ /* Restore registers from the new stack */
pop dph pop dph
pop dpl pop dpl
/* Restore the interrupt state per the stored IE value */ /* Restore the interrupt state per the stored IE value */
+3 -3
View File
@@ -112,7 +112,7 @@ void up_unblock_task(FAR struct tcb_s *tcb)
/* The currently active task has changed! We need to do /* The currently active task has changed! We need to do
* a context switch to the new task. * a context switch to the new task.
* *
* Are we in an interrupt handler? * Are we in an interrupt handler?
*/ */
if (g_irqtos) if (g_irqtos)
@@ -123,7 +123,7 @@ void up_unblock_task(FAR struct tcb_s *tcb)
up_saveirqcontext(&rtcb->xcp); up_saveirqcontext(&rtcb->xcp);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
@@ -138,7 +138,7 @@ void up_unblock_task(FAR struct tcb_s *tcb)
} }
/* We are not in an interrupt andler. Copy the user C context /* We are not in an interrupt andler. Copy the user C context
* into the TCB of the task that was previously active. if * into the TCB of the task that was previously active. if
* up_savecontext returns a non-zero value, then this is really the * up_savecontext returns a non-zero value, then this is really the
* previously running task restarting! * previously running task restarting!
*/ */
+2 -2
View File
@@ -171,7 +171,7 @@ arch/arm - ARM-based micro-controllers
is complete on the basic port (timer, serial console, SPI). is complete on the basic port (timer, serial console, SPI).
arch/arm/include/lm and arch/arm/src/lm arch/arm/include/lm and arch/arm/src/lm
These directories contain support for the Luminary LM3S/4F family. The These directories contain support for the Luminary LM3S/4F family. The
initial, release of this port was included in NuttX version 0.4.6. The initial, release of this port was included in NuttX version 0.4.6. The
current port includes timer, serial console, Ethernet, SSI, and microSD current port includes timer, serial console, Ethernet, SSI, and microSD
support. There are working configurations the NuttX OS test, to run the support. There are working configurations the NuttX OS test, to run the
@@ -211,7 +211,7 @@ arch/arm - ARM-based micro-controllers
STATUS: The basic AT91SAM3U port was released in NuttX version 5.1. STATUS: The basic AT91SAM3U port was released in NuttX version 5.1.
The basic port includes boot-up logic, interrupt driven serial The basic port includes boot-up logic, interrupt driven serial
console, and system timer interrupts. That release passes the console, and system timer interrupts. That release passes the
NuttX OS test and is proven to have a valid OS implementation. A NuttX OS test and is proven to have a valid OS implementation. A
onfiguration to support the NuttShell is also included. onfiguration to support the NuttShell is also included.
arch/arm/include/stm32 and arch/arm/src/stm32 arch/arm/include/stm32 and arch/arm/src/stm32
+1 -1
View File
@@ -48,7 +48,7 @@
* Pre-Processor Definitions * Pre-Processor Definitions
****************************************************************************************/ ****************************************************************************************/
/* External interrupts numbers */ /* External interrupts numbers */
#define A1X_IRQ_NMI 0 /* External Non-Mask Interrupt */ #define A1X_IRQ_NMI 0 /* External Non-Mask Interrupt */
# define A1X_IRQ_POWER 0 /* Power module */ # define A1X_IRQ_POWER 0 /* Power module */
+1 -1
View File
@@ -60,7 +60,7 @@
* (1) stmia rx, {r0-r14} * (1) stmia rx, {r0-r14}
* (2) then the PC and CPSR * (2) then the PC and CPSR
* *
* This results in the following set of indices that can be used to access * This results in the following set of indices that can be used to access
* individual registers in the xcp.regs array: * individual registers in the xcp.regs array:
*/ */
+1 -1
View File
@@ -70,7 +70,7 @@
#ifdef CONFIG_ARCH_FPU #ifdef CONFIG_ARCH_FPU
/* If the MCU supports a floating point unit, then it will be necessary /* If the MCU supports a floating point unit, then it will be necessary
* to save the state of the non-volatile registers before calling code * to save the state of the non-volatile registers before calling code
* that may save and overwrite them. * that may save and overwrite them.
*/ */
+1 -1
View File
@@ -64,7 +64,7 @@
#define EF_ARM_EABI_VER4 0x04000000 #define EF_ARM_EABI_VER4 0x04000000
#define EF_ARM_EABI_VER5 0x05000000 #define EF_ARM_EABI_VER5 0x05000000
#define EF_ARM_BE8 0x00800000 #define EF_ARM_BE8 0x00800000
/* Table 4-4, Processor specific section types */ /* Table 4-4, Processor specific section types */
+1 -1
View File
@@ -56,7 +56,7 @@
/**************************************************************************** /****************************************************************************
* Definitions * Definitions
****************************************************************************/ ****************************************************************************/
/* LPC2378 Interrupts */ /* LPC2378 Interrupts */
#define WDT_IRQ 0 /* Watchdog */ #define WDT_IRQ 0 /* Watchdog */
+1 -1
View File
@@ -51,7 +51,7 @@
/******************************************************************************************** /********************************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
********************************************************************************************/ ********************************************************************************************/
/* IRQ numbers. The IRQ number corresponds vector number and hence map directly to bits in /* IRQ numbers. The IRQ number corresponds vector number and hence map directly to bits in
* the NVIC. This does, however, waste several words of memory in the IRQ to handle mapping * the NVIC. This does, however, waste several words of memory in the IRQ to handle mapping
* tables. * tables.
+1 -1
View File
@@ -82,7 +82,7 @@
#define NUC_IRQ_ADC (45) /* ADC */ #define NUC_IRQ_ADC (45) /* ADC */
/* 46: Reserved */ /* 46: Reserved */
#define NUC_IRQ_RTC (47) /* Real time clock */ #define NUC_IRQ_RTC (47) /* Real time clock */
#define NR_IRQS (48) #define NR_IRQS (48)
/************************************************************************************ /************************************************************************************
+1 -1
View File
@@ -46,7 +46,7 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************************************/ ****************************************************************************************************/
/* SAMA5D3 Family /* SAMA5D3 Family
* *
* ATSAMA5D31 ATSAMA5D33 ATSAMA5D34 ATSAMA5D35 ATSAMA5D36 * ATSAMA5D31 ATSAMA5D33 ATSAMA5D34 ATSAMA5D35 ATSAMA5D36
* ------------------------- ------------- ------------- ------------- ------------- ------------- * ------------------------- ------------- ------------- ------------- ------------- -------------
* Pin Count 324 324 324 324 324 * Pin Count 324 324 324 324 324
+1 -1
View File
@@ -113,7 +113,7 @@ static int a1x_pio_interrupt(int irq, void *context)
int irq; int irq;
/* Read the set of pending GPIO interrupts */ /* Read the set of pending GPIO interrupts */
status = getreg32(A1X_PIO_INT_STA); status = getreg32(A1X_PIO_INT_STA);
mask = getreg32(A1X_PIO_INT_CTL); mask = getreg32(A1X_PIO_INT_CTL);
pending = status & mask; pending = status & mask;
+1 -1
View File
@@ -120,7 +120,7 @@ void up_timerinit(void)
uint32_t regval; uint32_t regval;
/* Set the timer reload interval value */ /* Set the timer reload interval value */
putreg32(TMR_INTERVAL, A1X_TMR0_INTV_VALUE); putreg32(TMR_INTERVAL, A1X_TMR0_INTV_VALUE);
/* Configure timer 0: /* Configure timer 0:
+1 -1
View File
@@ -332,7 +332,7 @@ static inline unsigned int get_cp15c3(void)
* ARM926EJ-S operation: Invalidate set-associative * ARM926EJ-S operation: Invalidate set-associative
* Data: Should be zero * Data: Should be zero
*/ */
static inline void tlb_invalidate(void) static inline void tlb_invalidate(void)
{ {
unsigned int sbz = 0; unsigned int sbz = 0;
+6 -6
View File
@@ -183,7 +183,7 @@
* larger than the size of the physical paged region. That is the * larger than the size of the physical paged region. That is the
* core of what the On-Demanding Paging feature provides. * core of what the On-Demanding Paging feature provides.
*/ */
#define PG_L1_PAGED_PADDR (PGTABLE_BASE_PADDR + ((PG_PAGED_VBASE >> 20) << 2)) #define PG_L1_PAGED_PADDR (PGTABLE_BASE_PADDR + ((PG_PAGED_VBASE >> 20) << 2))
#define PG_L1_PAGED_VADDR (PGTABLE_BASE_VADDR + ((PG_PAGED_VBASE >> 20) << 2)) #define PG_L1_PAGED_VADDR (PGTABLE_BASE_VADDR + ((PG_PAGED_VBASE >> 20) << 2))
@@ -261,10 +261,10 @@
/* Case 2: Vectors are in low memory and the locked text region starts at /* Case 2: Vectors are in low memory and the locked text region starts at
* the beginning of SRAM (which will be aliased to address 0x00000000). * the beginning of SRAM (which will be aliased to address 0x00000000).
* However, the beginning of SRAM may not be aligned to the beginning * However, the beginning of SRAM may not be aligned to the beginning
* of the L2 page table (because the beginning of RAM is offset into * of the L2 page table (because the beginning of RAM is offset into
* the table. * the table.
*/ */
#elif defined(CONFIG_ARCH_LOWVECTORS) && !defined(CONFIG_PAGING_LOCKED_PBASE) #elif defined(CONFIG_ARCH_LOWVECTORS) && !defined(CONFIG_PAGING_LOCKED_PBASE)
# define PG_VECT_PBASE PG_LOCKED_PBASE # define PG_VECT_PBASE PG_LOCKED_PBASE
# define PG_L2_VECT_OFFSET (((PG_LOCKED_VBASE & 0x000fffff) >> PAGESHIFT) << 2) # define PG_L2_VECT_OFFSET (((PG_LOCKED_VBASE & 0x000fffff) >> PAGESHIFT) << 2)
@@ -327,7 +327,7 @@
* text region (the address at the beginning of * text region (the address at the beginning of
* the page). * the page).
* PG_POOL_MAXL2NDX - This is the maximum value+1 of such an index. * PG_POOL_MAXL2NDX - This is the maximum value+1 of such an index.
* *
* PG_POOL_PGPADDR(ndx) - Converts an page index into the corresponding * PG_POOL_PGPADDR(ndx) - Converts an page index into the corresponding
* (physical) address of the backing page memory. * (physical) address of the backing page memory.
* PG_POOL_PGVADDR(ndx) - Converts an page index into the corresponding * PG_POOL_PGVADDR(ndx) - Converts an page index into the corresponding
@@ -340,7 +340,7 @@
* written. * written.
*/ */
#define PG_POOL_VA2L1OFFSET(va) (((va) >> 20) << 2) #define PG_POOL_VA2L1OFFSET(va) (((va) >> 20) << 2)
#define PG_POOL_VA2L1VADDR(va) (PGTABLE_BASE_VADDR + PG_POOL_VA2L1OFFSET(va)) #define PG_POOL_VA2L1VADDR(va) (PGTABLE_BASE_VADDR + PG_POOL_VA2L1OFFSET(va))
#define PG_POOL_L12PPTABLE(L1) ((L1) & PG_L1_PADDRMASK) #define PG_POOL_L12PPTABLE(L1) ((L1) & PG_L1_PADDRMASK)
#define PG_POOL_L12VPTABLE(L1) (PG_POOL_L12PPTABLE(L1) - PGTABLE_BASE_PADDR + PGTABLE_BASE_VADDR) #define PG_POOL_L12VPTABLE(L1) (PG_POOL_L12PPTABLE(L1) - PGTABLE_BASE_PADDR + PGTABLE_BASE_VADDR)
@@ -442,7 +442,7 @@
* follows: * follows:
* *
* ldr r0, =PG_L1_PGTABLE_PADDR <-- Address in the L1 table * ldr r0, =PG_L1_PGTABLE_PADDR <-- Address in the L1 table
* ldr r1, =PG_L2_PGTABLE_PADDR <-- Physical address of L2 page table * ldr r1, =PG_L2_PGTABLE_PADDR <-- Physical address of L2 page table
* ldr r2, =PG_PGTABLE_NPAGES <-- Total number of pages * ldr r2, =PG_PGTABLE_NPAGES <-- Total number of pages
* ldr r3, =PG_PGTABLE_NPAGE1 <-- Number of pages in the first PTE * ldr r3, =PG_PGTABLE_NPAGE1 <-- Number of pages in the first PTE
* ldr r4, =MMU_L1_PGTABFLAGS <-- L1 MMU flags * ldr r4, =MMU_L1_PGTABFLAGS <-- L1 MMU flags
+4 -4
View File
@@ -171,7 +171,7 @@ int up_allocpage(FAR struct tcb_s *tcb, FAR void **vpage)
uintptr_t paddr; uintptr_t paddr;
uint32_t *pte; uint32_t *pte;
unsigned int pgndx; unsigned int pgndx;
/* Since interrupts are disabled, we don't need to anything special. */ /* Since interrupts are disabled, we don't need to anything special. */
DEBUGASSERT(tcb && vpage); DEBUGASSERT(tcb && vpage);
@@ -199,7 +199,7 @@ int up_allocpage(FAR struct tcb_s *tcb, FAR void **vpage)
if (g_pgwrap) if (g_pgwrap)
{ {
/* Yes.. Get a pointer to the L2 entry corresponding to the previous /* Yes.. Get a pointer to the L2 entry corresponding to the previous
* mapping -- then zero it! * mapping -- then zero it!
*/ */
uintptr_t oldvaddr = PG_POOL_NDX2VA(g_ptemap[pgndx]); uintptr_t oldvaddr = PG_POOL_NDX2VA(g_ptemap[pgndx]);
@@ -214,7 +214,7 @@ int up_allocpage(FAR struct tcb_s *tcb, FAR void **vpage)
* case: The I-Cache uses a virtual address index and, hence, since the * case: The I-Cache uses a virtual address index and, hence, since the
* NuttX address space is flat, the cached instruction value should be * NuttX address space is flat, the cached instruction value should be
* correct even if the page mapping is no longer in place. * correct even if the page mapping is no longer in place.
*/ */
} }
/* Then convert the index to a (physical) page address. */ /* Then convert the index to a (physical) page address. */
@@ -231,7 +231,7 @@ int up_allocpage(FAR struct tcb_s *tcb, FAR void **vpage)
*pte = (paddr | MMU_L2_ALLOCFLAGS); *pte = (paddr | MMU_L2_ALLOCFLAGS);
/* And save the new L1 index */ /* And save the new L1 index */
g_ptemap[pgndx] = PG_POOL_VA2L2NDX(vaddr); g_ptemap[pgndx] = PG_POOL_VA2L2NDX(vaddr);
/* Finally, return the virtual address of allocated page */ /* Finally, return the virtual address of allocated page */
+2 -2
View File
@@ -130,7 +130,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
up_savestate(rtcb->xcp.regs); up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
@@ -148,7 +148,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
else if (!up_saveusercontext(rtcb->xcp.regs)) else if (!up_saveusercontext(rtcb->xcp.regs))
{ {
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
+1 -1
View File
@@ -88,7 +88,7 @@
* Wait for interrupt SBZ MCR p15, 0, <Rd>, c7, c0, 4 * Wait for interrupt SBZ MCR p15, 0, <Rd>, c7, c0, 4
*/ */
/* Esure coherency between the Icache and the Dcache in the region described /* Esure coherency between the Icache and the Dcache in the region described
* by r0=start and r1=end. Cleans the corresponding D-cache lines and invalidates * by r0=start and r1=end. Cleans the corresponding D-cache lines and invalidates
* the corresponding I-Cache lines. * the corresponding I-Cache lines.
*/ */
+2 -2
View File
@@ -56,7 +56,7 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Output debug info if stack dump is selected -- even if /* Output debug info if stack dump is selected -- even if
* debug is not selected. * debug is not selected.
*/ */
@@ -139,7 +139,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
* the exception occurred, this address was provided in the FAR register. * the exception occurred, this address was provided in the FAR register.
* (It has not yet been saved in the register context save area). * (It has not yet been saved in the register context save area).
*/ */
pgllvdbg("VBASE: %08x VEND: %08x\n", PG_PAGED_VBASE, PG_PAGED_VEND); pgllvdbg("VBASE: %08x VEND: %08x\n", PG_PAGED_VBASE, PG_PAGED_VEND);
if (far < PG_PAGED_VBASE || far >= PG_PAGED_VEND) if (far < PG_PAGED_VBASE || far >= PG_PAGED_VEND)
{ {
+1 -1
View File
@@ -56,7 +56,7 @@
/* Debug ********************************************************************/ /* Debug ********************************************************************/
/* Output debug info if stack dump is selected -- even if /* Output debug info if stack dump is selected -- even if
* debug is not selected. * debug is not selected.
*/ */
+3 -3
View File
@@ -97,7 +97,7 @@ void up_release_pending(void)
up_savestate(rtcb->xcp.regs); up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
@@ -111,13 +111,13 @@ void up_release_pending(void)
/* Copy the exception context into the TCB of the task that /* Copy the exception context into the TCB of the task that
* was currently active. if up_saveusercontext returns a non-zero * was currently active. if up_saveusercontext returns a non-zero
* value, then this is really the previously running task * value, then this is really the previously running task
* restarting! * restarting!
*/ */
else if (!up_saveusercontext(rtcb->xcp.regs)) else if (!up_saveusercontext(rtcb->xcp.regs))
{ {
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
+3 -3
View File
@@ -69,7 +69,7 @@
* *
* Description: * Description:
* Called when the priority of a running or * Called when the priority of a running or
* ready-to-run task changes and the reprioritization will * ready-to-run task changes and the reprioritization will
* cause a context switch. Two cases: * cause a context switch. Two cases:
* *
* 1) The priority of the currently running task drops and the next * 1) The priority of the currently running task drops and the next
@@ -152,7 +152,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
up_savestate(rtcb->xcp.regs); up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
@@ -171,7 +171,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
else if (!up_saveusercontext(rtcb->xcp.regs)) else if (!up_saveusercontext(rtcb->xcp.regs))
{ {
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
+1 -1
View File
@@ -50,7 +50,7 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Output debug info if stack dump is selected -- even if /* Output debug info if stack dump is selected -- even if
* debug is not selected. * debug is not selected.
*/ */
+3 -3
View File
@@ -109,7 +109,7 @@ void up_unblock_task(struct tcb_s *tcb)
/* The currently active task has changed! We need to do /* The currently active task has changed! We need to do
* a context switch to the new task. * a context switch to the new task.
* *
* Are we in an interrupt handler? * Are we in an interrupt handler?
*/ */
if (current_regs) if (current_regs)
@@ -120,7 +120,7 @@ void up_unblock_task(struct tcb_s *tcb)
up_savestate(rtcb->xcp.regs); up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
@@ -132,7 +132,7 @@ void up_unblock_task(struct tcb_s *tcb)
} }
/* We are not in an interrupt handler. Copy the user C context /* We are not in an interrupt handler. Copy the user C context
* into the TCB of the task that was previously active. if * into the TCB of the task that was previously active. if
* up_saveusercontext returns a non-zero value, then this is really the * up_saveusercontext returns a non-zero value, then this is really the
* previously running task restarting! * previously running task restarting!
*/ */
+1 -1
View File
@@ -48,7 +48,7 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Output debug info if stack dump is selected -- even if /* Output debug info if stack dump is selected -- even if
* debug is not selected. * debug is not selected.
*/ */
+1 -1
View File
@@ -156,7 +156,7 @@ up_vectorirq:
/************************************************************************************ /************************************************************************************
* Function: up_vectorswi * Function: up_vectorswi
* *
* Description: * Description:
* SWI interrupt. We enter the SWI in SVC mode. * SWI interrupt. We enter the SWI in SVC mode.
* *
+2 -2
View File
@@ -64,7 +64,7 @@
* undefined if the process created by vfork() either modifies any data other than * undefined if the process created by vfork() either modifies any data other than
* a variable of type pid_t used to store the return value from vfork(), or returns * a variable of type pid_t used to store the return value from vfork(), or returns
* from the function in which vfork() was called, or calls any other function before * from the function in which vfork() was called, or calls any other function before
* successfully calling _exit() or one of the exec family of functions. * successfully calling _exit() or one of the exec family of functions.
* *
* This thin layer implements vfork by simply calling up_vfork() with the vfork() * This thin layer implements vfork by simply calling up_vfork() with the vfork()
* context as an argument. The overall sequence is: * context as an argument. The overall sequence is:
@@ -93,7 +93,7 @@
* Upon successful completion, vfork() returns 0 to the child process and returns * Upon successful completion, vfork() returns 0 to the child process and returns
* the process ID of the child process to the parent process. Otherwise, -1 is * the process ID of the child process to the parent process. Otherwise, -1 is
* returned to the parent, no child process is created, and errno is set to * returned to the parent, no child process is created, and errno is set to
* indicate the error. * indicate the error.
* *
************************************************************************************/ ************************************************************************************/
+1 -1
View File
@@ -368,7 +368,7 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" extern "C"
{ {
#else #else
#define EXTERN extern #define EXTERN extern
+1 -1
View File
@@ -129,7 +129,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
up_savestate(rtcb->xcp.regs); up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
+1 -1
View File
@@ -296,7 +296,7 @@ int arch_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
S = (offset >> 24) & 1; S = (offset >> 24) & 1;
J1 = S ^ (~(offset >> 23) & 1); J1 = S ^ (~(offset >> 23) & 1);
J2 = S ^ (~(offset >> 22) & 1); J2 = S ^ (~(offset >> 22) & 1);
upper_insn = ((upper_insn & 0xf800) | (S << 10) | ((offset >> 12) & 0x03ff)); upper_insn = ((upper_insn & 0xf800) | (S << 10) | ((offset >> 12) & 0x03ff));
*(uint16_t*)addr = (uint16_t)upper_insn; *(uint16_t*)addr = (uint16_t)upper_insn;
+1 -1
View File
@@ -96,7 +96,7 @@ void up_initial_state(struct tcb_s *tcb)
/* Save the task entry point (stripping off the thumb bit) */ /* Save the task entry point (stripping off the thumb bit) */
xcp->regs[REG_PC] = (uint32_t)tcb->start & ~1; xcp->regs[REG_PC] = (uint32_t)tcb->start & ~1;
/* Specify thumb mode */ /* Specify thumb mode */
xcp->regs[REG_XPSR] = ARMV6M_XPSR_T; xcp->regs[REG_XPSR] = ARMV6M_XPSR_T;
+1 -1
View File
@@ -96,7 +96,7 @@ void up_release_pending(void)
up_savestate(rtcb->xcp.regs); up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
+2 -2
View File
@@ -69,7 +69,7 @@
* *
* Description: * Description:
* Called when the priority of a running or * Called when the priority of a running or
* ready-to-run task changes and the reprioritization will * ready-to-run task changes and the reprioritization will
* cause a context switch. Two cases: * cause a context switch. Two cases:
* *
* 1) The priority of the currently running task drops and the next * 1) The priority of the currently running task drops and the next
@@ -153,7 +153,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
up_savestate(rtcb->xcp.regs); up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
+1 -1
View File
@@ -68,7 +68,7 @@ void up_systemreset(void)
regval = ((0x5fa << SYSCON_AIRCR_VECTKEY_SHIFT) | SYSCON_AIRCR_SYSRESETREQ); regval = ((0x5fa << SYSCON_AIRCR_VECTKEY_SHIFT) | SYSCON_AIRCR_SYSRESETREQ);
putreg32(regval, ARMV6M_SYSCON_AIRCR); putreg32(regval, ARMV6M_SYSCON_AIRCR);
/* Ensure completion of memory accesses */ /* Ensure completion of memory accesses */
__asm volatile ("dsb"); __asm volatile ("dsb");
+2 -2
View File
@@ -108,7 +108,7 @@ void up_unblock_task(struct tcb_s *tcb)
/* The currently active task has changed! We need to do /* The currently active task has changed! We need to do
* a context switch to the new task. * a context switch to the new task.
* *
* Are we in an interrupt handler? * Are we in an interrupt handler?
*/ */
if (current_regs) if (current_regs)
@@ -119,7 +119,7 @@ void up_unblock_task(struct tcb_s *tcb)
up_savestate(rtcb->xcp.regs); up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
+1 -1
View File
@@ -84,7 +84,7 @@ extern char _ebss;
* Note that the [ ... ] desginated initialiser is a GCC extension. * Note that the [ ... ] desginated initialiser is a GCC extension.
*/ */
unsigned _vectors[] __attribute__((section(".vectors"))) = unsigned _vectors[] __attribute__((section(".vectors"))) =
{ {
/* Initial stack */ /* Initial stack */
+2 -2
View File
@@ -65,7 +65,7 @@
* undefined if the process created by vfork() either modifies any data other than * undefined if the process created by vfork() either modifies any data other than
* a variable of type pid_t used to store the return value from vfork(), or returns * a variable of type pid_t used to store the return value from vfork(), or returns
* from the function in which vfork() was called, or calls any other function before * from the function in which vfork() was called, or calls any other function before
* successfully calling _exit() or one of the exec family of functions. * successfully calling _exit() or one of the exec family of functions.
* *
* This thin layer implements vfork by simply calling up_vfork() with the vfork() * This thin layer implements vfork by simply calling up_vfork() with the vfork()
* context as an argument. The overall sequence is: * context as an argument. The overall sequence is:
@@ -94,7 +94,7 @@
* Upon successful completion, vfork() returns 0 to the child process and returns * Upon successful completion, vfork() returns 0 to the child process and returns
* the process ID of the child process to the parent process. Otherwise, -1 is * the process ID of the child process to the parent process. Otherwise, -1 is
* returned to the parent, no child process is created, and errno is set to * returned to the parent, no child process is created, and errno is set to
* indicate the error. * indicate the error.
* *
************************************************************************************/ ************************************************************************************/
+4 -4
View File
@@ -171,7 +171,7 @@ int arm_allocpage(FAR struct tcb_s *tcb, FAR void **vpage)
uintptr_t paddr; uintptr_t paddr;
uint32_t *pte; uint32_t *pte;
unsigned int pgndx; unsigned int pgndx;
/* Since interrupts are disabled, we don't need to anything special. */ /* Since interrupts are disabled, we don't need to anything special. */
DEBUGASSERT(tcb && vpage); DEBUGASSERT(tcb && vpage);
@@ -199,7 +199,7 @@ int arm_allocpage(FAR struct tcb_s *tcb, FAR void **vpage)
if (g_pgwrap) if (g_pgwrap)
{ {
/* Yes.. Get a pointer to the L2 entry corresponding to the previous /* Yes.. Get a pointer to the L2 entry corresponding to the previous
* mapping -- then zero it! * mapping -- then zero it!
*/ */
uintptr_t oldvaddr = PG_POOL_NDX2VA(g_ptemap[pgndx]); uintptr_t oldvaddr = PG_POOL_NDX2VA(g_ptemap[pgndx]);
@@ -214,7 +214,7 @@ int arm_allocpage(FAR struct tcb_s *tcb, FAR void **vpage)
* case: The I-Cache uses a virtual address index and, hence, since the * case: The I-Cache uses a virtual address index and, hence, since the
* NuttX address space is flat, the cached instruction value should be * NuttX address space is flat, the cached instruction value should be
* correct even if the page mapping is no longer in place. * correct even if the page mapping is no longer in place.
*/ */
} }
/* Then convert the index to a (physical) page address. */ /* Then convert the index to a (physical) page address. */
@@ -231,7 +231,7 @@ int arm_allocpage(FAR struct tcb_s *tcb, FAR void **vpage)
*pte = (paddr | MMU_L2_ALLOCFLAGS); *pte = (paddr | MMU_L2_ALLOCFLAGS);
/* And save the new L1 index */ /* And save the new L1 index */
g_ptemap[pgndx] = PG_POOL_VA2L2NDX(vaddr); g_ptemap[pgndx] = PG_POOL_VA2L2NDX(vaddr);
/* Finally, return the virtual address of allocated page */ /* Finally, return the virtual address of allocated page */
+2 -2
View File
@@ -130,7 +130,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
up_savestate(rtcb->xcp.regs); up_savestate(rtcb->xcp.regs);
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */
@@ -148,7 +148,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
else if (!up_saveusercontext(rtcb->xcp.regs)) else if (!up_saveusercontext(rtcb->xcp.regs))
{ {
/* Restore the exception context of the rtcb at the (new) head /* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list. * of the g_readytorun task list.
*/ */

Some files were not shown because too many files have changed in this diff Show More