Eliminate obsolete coding convention comments

Gets rid of single-line comments required by a previous set of
coding conventions. These comments provide no value to readers
and just clutter things up.

Change-Id: I2a08b12cf5026253de56979efdfc510e7e68defe
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
Allan Stephens 2015-06-01 09:50:33 -04:00 committed by Anas Nashif
commit a1bd59de35
77 changed files with 0 additions and 370 deletions

View file

@ -35,8 +35,6 @@ DESCRIPTION
This module provides the _SysFatalErrorHandler() routine for ARCv2 BSPs.
*/
/* includes */
#include <cputype.h>
#include <nanokernel.h>
#include <arch/cpu.h>

View file

@ -35,8 +35,6 @@ DESCRIPTION
This module provides the _SysFatalErrorHandler() routine for Cortex-M BSPs.
*/
/* includes */
#include <cputype.h>
#include <nanokernel.h>
#include <arch/cpu.h>

View file

@ -35,8 +35,6 @@ DESCRIPTION
This module provides the _NanoFatalErrorHandler() routine for ARM Cortex-M.
*/
/* includes */
#include <toolchain.h>
#include <sections.h>
@ -52,8 +50,6 @@ This module provides the _NanoFatalErrorHandler() routine for ARM Cortex-M.
#define PR_EXC(...)
#endif /* CONFIG_PRINTK */
/* globals */
/*
* Define a default ESF for use with _NanoFatalErrorHandler() in the event
* the caller does not have a NANO_ESF to pass

View file

@ -82,8 +82,6 @@ static uint32_t clock_accumulated_count = 0;
#include <board.h>
/* defines */
/*
* When GDB_INFO is enabled, the handler installed in the vector table
* (__systick), can be found in systick_gdb.s. In this case, the handler
@ -103,8 +101,6 @@ static uint32_t clock_accumulated_count = 0;
#define IDLE_TICKLESS 1 /* tickless idle mode */
#endif /* CONFIG_TICKLESS_IDLE */
/* globals */
#ifdef CONFIG_INT_LATENCY_BENCHMARK
extern uint32_t _hw_irq_to_c_handler_latency;
#endif
@ -119,8 +115,6 @@ extern void _sys_power_save_idle_exit(int32_t ticks);
extern int32_t _sys_idle_elapsed_ticks;
#endif /* CONFIG_TICKLESS_IDLE */
/* locals */
#ifdef CONFIG_TICKLESS_IDLE
static uint32_t __noinit default_load_value; /* default count */
static uint32_t idle_original_count = 0;

View file

@ -36,8 +36,6 @@ This module provides the _SysFatalErrorHandler() routine which is common to
supported BSPs.
*/
/* includes */
#include <cputype.h>
#include <nanokernel.h>
#include <arch/cpu.h>

View file

@ -81,8 +81,6 @@ The _EXC_STUB_SIZE macro is defined in arch/x86/include/nanok.h.
#include <nanok.h>
/* forward declarations */
void _NanoCpuExcConnectAtDpl(unsigned int vector,
void (*routine)(NANO_ESF * pEsf),
NANO_EXC_STUB pExcStubMem,

View file

@ -36,8 +36,6 @@ This module contains routines for updating the global descriptor table (GDT)
for the IA-32 architecture.
*/
/* includes */
#include <linker-defs.h>
#include <toolchain.h>
#include <sections.h>
@ -46,8 +44,6 @@ for the IA-32 architecture.
#include <arch/cpu.h>
#include <gdt.h>
/* defines */
#if (CONFIG_NUM_GDT_SPARE_ENTRIES < 0)
#error "**** CONFIG_NUM_GDT_SPARE_ENTRIES must be at least 0\n\n"
#endif
@ -57,8 +53,6 @@ for the IA-32 architecture.
#define MAX_GDT_ENTRIES \
(NUM_BASE_GDT_ENTRIES + CONFIG_NUM_GDT_SPARE_ENTRIES)
/* locals */
/*
* The RAM based global descriptor table. It is aligned on an 8 byte boundary
* as the Intel manuals recommend this for best performance.
@ -91,8 +85,6 @@ static
},
};
/* globals */
tGdtHeader _gdt = {
sizeof(tGdtDesc[MAX_GDT_ENTRIES - CONFIG_NUM_GDT_SPARE_ENTRIES]) -
1,

View file

@ -45,8 +45,6 @@ These operators are currently unavailable to user space applications
as there is no requirement for this capability.
*/
/* includes */
#if defined(CONFIG_LOCK_INSTRUCTION_UNSUPPORTED)
#include <nanokernel.h>

View file

@ -36,8 +36,6 @@ This module provides core nanokernel fiber related primitives for the IA-32
processor architecture.
*/
/* includes */
#ifdef CONFIG_MICROKERNEL
#include <microkernel.h>
#include <kernel_struct.h>

View file

@ -35,7 +35,6 @@ DESCRIPTION
This module provides the _NanoFatalErrorHandler() routine.
*/
/* includes */
#include <toolchain.h>
#include <sections.h>
@ -46,8 +45,6 @@ This module provides the _NanoFatalErrorHandler() routine.
#include <misc/printk.h>
/* globals */
/*
* Define a default ESF for use with _NanoFatalErrorHandler() in the event
* the caller does not have a NANO_ESF to pass

View file

@ -39,8 +39,6 @@ IA-32 architecture.
#ifndef _GDT_H
#define _GDT_H
/* includes */
#include <arch/x86/arch.h>
#ifndef _ASMLANGUAGE
@ -48,8 +46,6 @@ IA-32 architecture.
#include <stdint.h>
#include <toolchain.h>
/* typedefs */
/* a generic GDT entry structure definition */
typedef struct s_gdtDesc {

View file

@ -47,8 +47,6 @@ offsets.o module.
#ifndef _NANOK_H
#define _NANOK_H
/* includes */
#include <toolchain.h>
#include <sections.h>
#include <asm_inline.h>

View file

@ -75,8 +75,6 @@ INCLUDE FILES: ioapic.h loapic.h
SEE ALSO: loApicIntr.c
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
@ -88,8 +86,6 @@ SEE ALSO: loApicIntr.c
#include <drivers/ioapic.h> /* public API declarations */
#include <drivers/loapic.h> /* public API declarations and registers */
/* defines */
/* IO APIC direct register offsets */
#define IOAPIC_IND 0x00 /* Index Register */
@ -196,8 +192,6 @@ SEE ALSO: loApicIntr.c
#endif /* IOAPIC_MSI_REDIRECT */
/* forward declarations */
#ifndef XIOAPIC_DIRECT_ADDRESSING
static uint32_t __IoApicGet(int32_t offset);
static void __IoApicSet(int32_t offset, uint32_t value);

View file

@ -103,8 +103,6 @@ per priority level.
INCLUDE FILES: loapic.h
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <stdint.h>
@ -114,8 +112,6 @@ INCLUDE FILES: loapic.h
#include <sections.h>
#include <drivers/loapic.h> /* public API declarations */
/* defines */
/* IA32_APIC_BASE MSR Bits */
#define LOAPIC_BASE_MASK 0xfffff000 /* LO APIC Base Addr mask */

View file

@ -96,8 +96,6 @@ extern struct nano_stack _k_command_stack;
#include <board.h>
/* defines */
/* HPET register offsets */
#define GENERAL_CAPS_REG 0 /* 64-bit register */
@ -196,7 +194,6 @@ extern struct nano_stack _k_command_stack;
#define HPET_COMP_DELAY 192
/* locals */
#ifdef CONFIG_DYNAMIC_INT_STUBS
static NANO_CPU_INT_STUB_DECL(_hpetIntStub); /* interrupt stub memory */
#else /* !CONFIG_DYNAMIC_INT_STUBS */

View file

@ -43,8 +43,6 @@ divided by a value specified in the divide configuration register.
After reset, the timer is initialized to zero.
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <toolchain.h>
@ -72,8 +70,6 @@ After reset, the timer is initialized to zero.
#include <board.h>
/* defines */
/* Local APIC Timer Bits */
#define LOAPIC_TIMER_DIVBY_2 0x0 /* Divide by 2 */
@ -112,13 +108,10 @@ After reset, the timer is initialized to zero.
do {/* nothing */ \
} while (0)
#endif /* !TIMER_SUPPORTS_TICKLESS */
/* globals */
#if defined(TIMER_SUPPORTS_TICKLESS)
extern int32_t _sys_idle_elapsed_ticks;
#endif /* TIMER_SUPPORTS_TICKLESS */
/* locals */
#ifdef CONFIG_DYNAMIC_INT_STUBS
static NANO_CPU_INT_STUB_DECL(
_loapic_timer_irq_stub); /* interrupt stub memory for */

View file

@ -39,7 +39,6 @@ Interrupt stuff, abstracted across CPU architectures.
#ifndef _IRQ_TEST_COMMON__H_
#define _IRQ_TEST_COMMON__H_
/* defines */
#if defined(VXMICRO_ARCH_x86)
#define IRQ_PRIORITY 3

View file

@ -32,8 +32,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#ifdef CONFIG_NANOKERNEL
/* For the nanokernel. */
#include <nanokernel.h>
@ -46,8 +44,6 @@
#include <nanokernel/cpu.h> //!< Used to be know as: irq_lock/irq_unlock
/* defines */
#ifdef CONFIG_NANOKERNEL
/* For the nanokernel. */
#define FORK(x) &forks[x]

View file

@ -38,8 +38,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#ifdef CONFIG_NANOKERNEL
#include <nanokernel.h>
#include "phil.h"
@ -48,8 +46,6 @@
#include "phil.h"
#endif
/* defines */
#define DEMO_DESCRIPTION \
"\x1b[2J\x1b[15;1H" \
"Demo Description\n" \

View file

@ -83,8 +83,6 @@ the last level acknowledged and serviced.
* specific and implemented in assembler
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <toolchain.h>
@ -93,15 +91,11 @@ the last level acknowledged and serviced.
#include <drivers/pic.h>
#include <board.h>
/* defines */
#define OCW3_DEF 0x08 /* 3rd default control word */
#define OCW3_PCB 0x04 /* Polling Control Bit */
#define OCW3_ISR 0x03 /* Read in-service reg */
#define OCW3_IRR 0x02 /* Read inter request reg */
/* globals */
#ifndef CONFIG_SHUTOFF_PIC
unsigned int _i8259_spurious_interrupt_count =
0; /* track # of spurious interrupts */

View file

@ -37,8 +37,6 @@ This module implements the PCI config space access functions
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>

View file

@ -37,8 +37,6 @@ This module implements the PCI H/W access functions.
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>

View file

@ -40,8 +40,6 @@ values in the uart_init_info structure before calling uart_init().
INCLUDE FILES: drivers/serial/k20_uart.h
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <stdint.h>
@ -53,16 +51,12 @@ INCLUDE FILES: drivers/serial/k20_uart.h
#include <toolchain.h>
#include <sections.h>
/* typedefs */
typedef struct {
uint8_t *base; /* base address of registers */
uint8_t irq; /* interrupt request level */
uint8_t intPri; /* interrupt priority */
} _k20Uart_t;
/* locals */
UART_PORTS_CONFIGURE(_k20Uart_t, uart);
/*******************************************************************************

View file

@ -56,8 +56,6 @@ A board support package's board.h header must provide definitions for:
INCLUDE FILES: drivers/uart.h
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <stdint.h>
@ -71,8 +69,6 @@ INCLUDE FILES: drivers/uart.h
#include <pci/pci_mgr.h>
#endif /* CONFIG_PCI */
/* defines */
/* register definitions */
#define REG_THR 0x00 /* Transmitter holding reg. */
@ -228,8 +224,6 @@ INCLUDE FILES: drivers/uart.h
} while (0)
#endif /* VXMICRO_ARCH_Intel */
/* typedefs */
struct ns16550 {
uint32_t port; /* base port number or MM base address */
uint8_t irq; /* interrupt request level */
@ -237,8 +231,6 @@ struct ns16550 {
uint8_t iirCache; /* cache of IIR since it clears when read */
};
/* locals */
#if !(defined(UART_PORTS_CONFIGURE)) && !(defined(CONFIG_PCI))
#error "CONFIG_PCI or UART_PORTS_CONFIGURE is needed"

View file

@ -49,8 +49,6 @@ An interrupt controller driver will not be utilized, so this driver will
directly invoke the VIOAPIC APIs to configure/unmask the IRQ.
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <toolchain.h>
@ -84,8 +82,6 @@ directly invoke the VIOAPIC APIs to configure/unmask the IRQ.
#include <board.h>
/* defines */
#if defined(CONFIG_TICKLESS_IDLE)
#define TIMER_SUPPORTS_TICKLESS
#endif
@ -115,14 +111,10 @@ directly invoke the VIOAPIC APIs to configure/unmask the IRQ.
#define PIT_CNT2(base) PIT_ADRS(base, 0x02) /* counter/channel 2 */
#define PIT_CMD(base) PIT_ADRS(base, 0x03) /* control word */
/* globals */
#if defined(TIMER_SUPPORTS_TICKLESS)
extern int32_t _sys_idle_elapsed_ticks;
#endif
/* locals */
/* interrupt stub memory for irq_connect() */
#ifndef CONFIG_DYNAMIC_INT_STUBS

View file

@ -37,8 +37,6 @@
extern "C" {
#endif
/* includes */
#include <microkernel/k_types.h>
/* define size of command packet (without exposing its internal structure) */
@ -72,8 +70,6 @@ extern "C" {
#define CMD_PKT_SET(name) (*(struct cmd_pkt_set *)(name))
/* typedefs */
typedef uint32_t cmdPkt_t[CMD_PKT_SIZE_IN_WORDS];
struct cmd_pkt_set {

View file

@ -33,8 +33,6 @@
#ifndef TICKS_H
#define TICKS_H
/* includes */
#include <nanokernel.h>
#include <clock_vars.h>

View file

@ -39,8 +39,6 @@ linked list.
#ifndef _DLIST_H
#define _DLIST_H
/* typedefs */
typedef struct dnode_s {
union {
struct dnode_s *head; /* ptr to head of list (dlist_t) */

View file

@ -52,8 +52,6 @@ corruption of command packets that are already in use. To this end, drivers
that have an ISR component should use their own command packet set.
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <microkernel/cmdPkt.h>

View file

@ -30,8 +30,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#include <microkernel.h>
#include <string.h>
#include <toolchain.h>

View file

@ -55,8 +55,6 @@ levels (too high, or too low).
NOMANUAL
*/
/* includes */
#include <microkernel.h>
#include <minik.h>
#include <nanok.h>

View file

@ -30,8 +30,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#include <microkernel.h>
#include <toolchain.h>
#include <sections.h>

View file

@ -30,8 +30,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#include <minik.h>
#include <string.h>
#include <toolchain.h>

View file

@ -40,7 +40,6 @@ When this feature is enabled, the compiler generated code refers to
function __stack_chk_fail and global variable __stack_chk_guard.
*/
/* includes */
#include <toolchain.h> /* compiler specific configurations */
#if defined(CONFIG_STACK_CANARIES)

View file

@ -30,8 +30,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#ifdef CONFIG_INT_LATENCY_BENCHMARK
#include "toolchain.h"
@ -42,12 +40,8 @@
#include <clock_vars.h>
#include <drivers/system_timer.h>
/* defines */
#define NB_CACHE_WARMING_DRY_RUN 7
/* locals */
/*
* Timestamp corresponding to when interrupt were turned off.
* A value of zero indicated interrupt are not currently locked.
@ -69,8 +63,6 @@ static uint32_t int_lock_unlock_nest = 0;
/* indicate if the interrupt latency benchamrk is ready to be used */
static uint32_t int_latency_bench_ready = 0;
/* globals */
/* min amount of time it takes from HW interrupt generation to 'C' handler */
uint32_t _hw_irq_to_c_handler_latency = ULONG_MAX;

View file

@ -30,8 +30,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#include <nanok.h>
#include <toolchain.h>
#include <sections.h>

View file

@ -30,13 +30,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#include <cputype.h>
#include "version.h" /* generated by MAKE, at compile time */
/* locals */
static uint32_t kernel_version = KERNELVERSION;
/*******************************************************************************

View file

@ -40,8 +40,6 @@ simplifies the adding and removing of nodes to/from the list.
\NOMANUAL
*/
/* includes */
#include <stddef.h>
#include <misc/dlist.h>

View file

@ -39,8 +39,6 @@ Interrupt stuff, abstracted across CPU architectures.
#ifndef _IRQ_TEST_COMMON__H_
#define _IRQ_TEST_COMMON__H_
/* defines */
#if defined(VXMICRO_ARCH_x86)
#define IRQ_PRIORITY 3
#elif defined(VXMICRO_ARCH_arm)

View file

@ -33,8 +33,6 @@
#ifndef __TC_UTIL_H__
#define __TC_UTIL_H__
/* includes */
#if defined(CONFIG_NANOKERNEL)
#include <nanokernel.h>
#else
@ -44,8 +42,6 @@
#include <misc/printk.h>
#include <string.h>
/* defines */
#define PRINT_DATA(fmt, ...) printk(fmt, ##__VA_ARGS__)
#define PRINT_LINE \

View file

@ -29,16 +29,12 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#if defined(CONFIG_STDOUT_CONSOLE)
#include <stdio.h>
#else
#include <misc/printk.h>
#endif
/* defines */
#define N_PHILOSOPHERS 6
/*
* There are multiple tasks doing printfs and they may conflict.

View file

@ -29,8 +29,6 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#ifdef CONFIG_NANOKERNEL
#include <nanokernel.h>
#include "phil.h"
@ -41,8 +39,6 @@
#include <arch/cpu.h> /* irq_lock/irq_unlock */
/* defines */
#ifdef CONFIG_NANOKERNEL
#define FORK(x) &forks[x]
#define TAKE(x) nano_fiber_sem_take_wait(x)
@ -62,8 +58,6 @@
extern struct nano_sem forks[N_PHILOSOPHERS];
#else /* ! CONFIG_NANOKERNEL */
/* globals */
kmutex_t forks[] = {forkMutex0, forkMutex1, forkMutex2, forkMutex3, forkMutex4, forkMutex5};
#endif /* CONFIG_NANOKERNEL */

View file

@ -30,8 +30,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#ifdef CONFIG_NANOKERNEL
#include <nanokernel.h>
#include <arch/cpu.h>
@ -41,8 +39,6 @@
#include "phil.h"
#endif
/* defines */
#define DEMO_DESCRIPTION \
"\x1b[2J\x1b[15;1H" \
"Demo Description\n" \
@ -60,8 +56,6 @@
extern void philEntry(void);
/* globals */
char __stack philStack[N_PHILOSOPHERS][STSIZE];
struct nano_sem forks[N_PHILOSOPHERS];
#endif /* CONFIG_NANOKERNEL */

View file

@ -39,8 +39,6 @@ Measure boot time for both nanokernel and microkernel project which includes
- from _start to idle (for microkernel)
*/
/* includes */
#ifdef CONFIG_NANOKERNEL
#include <nanokernel.h>
#else

View file

@ -30,8 +30,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/* includes */
#include <microkernel.h>
#include <toolchain.h>
@ -41,8 +39,6 @@
#else
/* includes */
#include <arch/cpu.h>
#include <misc/printk.h>
#include <stdio.h>
@ -55,8 +51,6 @@
#endif /* __GNUC__ */
#endif /* TEST_reg */
/* defines */
#define IRQ_PRIORITY 3
#define TEST_SOFT_INT 64
@ -66,8 +60,6 @@
#define MESSAGE "Running regular microkernel configuration\n"
#endif /* TEST_max */
/* typedefs */
typedef void* (*pfunc) (void*);
/* variables */

View file

@ -35,19 +35,13 @@ DESCRIPTION
This module tests the task_offload_to_fiber() API.
*/
/* includes */
#include <vxmicro.h>
#include <tc_util.h>
#include <sections.h>
/* defines */
#define NUM_TICKS 500
#define TEST_TIMEOUT 2000
/* locals */
static uint32_t criticalVar = 0;
static uint32_t altTaskIterations = 0;

View file

@ -38,8 +38,6 @@ This modules tests the following event APIs:
*/
/* includes */
#include <tc_util.h>
#include <vxmicro.h>
#include <arch/cpu.h>
@ -51,14 +49,10 @@ This modules tests the following event APIs:
#include <irq_test_common.h>
#include <util_test_common.h>
/* typedefs */
typedef struct {
kevent_t event;
} ISR_INFO;
/* locals */
static int evidence = 0;
static ISR_INFO isrInfo;

View file

@ -36,12 +36,10 @@ The module implements functions for the fiber that tests
event signaling
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <vxmicro.h>
/* defines */
#define N_TESTS 10 /* number of tests to run */
#define FIBER_PRIORITY 6
#define FIBER_STACK_SIZE 1024
@ -49,8 +47,6 @@ event signaling
/* exports */
struct nano_sem fiberSem; /* semaphore that allows test control the fiber */
/* locals */
static char __stack fiberStack[FIBER_STACK_SIZE]; /* test fiber stack size */
/*******************************************************************************

View file

@ -45,14 +45,10 @@ Scenarios tested include:
- Verify the return codes are correct for the APIs
*/
/* includes */
#include <tc_util.h>
#include <stdbool.h>
#include <vxmicro.h>
/* defines */
#define MULTIPLIER 100 /* Used to initialize myData */
#define NUM_OF_ELEMENT 5 /* Number of elements in myData array */
#define DEPTH_OF_FIFO_QUEUE 2 /*
@ -63,8 +59,6 @@ Scenarios tested include:
#define SPECIAL_DATA 999 /* Special number to put in queue */
/* locals */
static int myData[NUM_OF_ELEMENT];
static int tcRC = TC_PASS; /* test case return code */

View file

@ -41,8 +41,6 @@ NOT guarantee that ALL standards-defined functionality is present, nor does
it guarantee that ALL functionality provided is working correctly.
*/
/* includes */
#include <microkernel.h>
#include <tc_util.h>

View file

@ -44,22 +44,16 @@ NOTE: At present only a single test task is used, but more tasks may be added
in the future to enhance test coverage.
*/
/* includes */
#include <tc_util.h>
#include <vxmicro.h>
#include <util_test_common.h>
/* defines */
#define NUM_TEST_TASKS 1 /* # of test tasks to monitor */
/* # ticks to wait for test completion */
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
/* locals */
/*
* Note that semaphore group entries are arranged so that resultSems[TC_PASS]
* refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL.
@ -67,9 +61,6 @@ in the future to enhance test coverage.
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
/* globals */
/*******************************************************************************
*
* RegressionTaskEntry - entry point for RegressionTask

View file

@ -58,28 +58,20 @@ are not (yet) tested include:
to ensure higher priority tasks get preference.
*/
/* includes */
#include <microkernel.h>
#include <tc_util.h>
/* defines */
#define MSGSIZE 16 /* Standard message data size */
#define XFER_PRIO 5 /* standard message transfer priority */
#define MSG_INFO1 1234 /* Message info test value */
#define MSG_INFO2 666 /* Message info test value */
/* locals */
static char myData1[MSGSIZE] = "This is myData1";
static char myData2[MSGSIZE] = "This is myData2";
static char myData3[MSGSIZE] = "This is myData3";
static char myData4[MSGSIZE] = "This is myData4";
/* globals */
extern ktask_t msgSenderTask;
extern ktask_t msgRcvrTask;

View file

@ -42,20 +42,14 @@ these semaphores until it detects a failure or the completion of all test tasks,
then announces the result of the test.
*/
/* includes */
#include <tc_util.h>
#include <vxmicro.h>
/* defines */
#define NUM_TEST_TASKS 2 /* # of test tasks to monitor */
/* # ticks to wait for test completion */
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
/* locals */
/*
* Note that semaphore group entries are arranged so that resultSems[TC_PASS]
* refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL.
@ -63,8 +57,6 @@ then announces the result of the test.
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
/* globals */
ktask_t msgSenderTask = MSGSENDERTASK;
ktask_t msgRcvrTask = MSGRCVRTASK;

View file

@ -44,14 +44,10 @@ allocated, and is only released once. Using an invalid pointer will have
unpredictable side effects.
*/
/* includes */
#include <tc_util.h>
#include <stdbool.h>
#include <vxmicro.h>
/* defines */
#define NUMBLOCKS 2 /*
* Number of memory blocks. This number
* has to be aligned with the number in VPF file
@ -59,12 +55,8 @@ unpredictable side effects.
* test is 2
*/
/* locals */
static int tcRC = TC_PASS; /* test case return code */
/* forward declarations */
int testMapGetAllBlocks(void **P);
int testMapFreeAllBlocks(void **P);

View file

@ -65,20 +65,14 @@ Timeline
: RegressionTask (@ priority 40) sleeps
*/
/* includes */
#include <tc_util.h>
#include <vxmicro.h>
/* defines */
#define ONE_SECOND (sys_clock_ticks_per_sec)
#define HALF_SECOND (sys_clock_ticks_per_sec / 2)
#define THIRD_SECOND (sys_clock_ticks_per_sec / 3)
#define FOURTH_SECOND (sys_clock_ticks_per_sec / 4)
/* locals */
static int tcRC = TC_PASS; /* test case return code */
/*******************************************************************************

View file

@ -42,20 +42,14 @@ these semaphores until it detects a failure or the completion of all test tasks,
then announces the result of the test.
*/
/* includes */
#include <vxmicro.h>
#include <tc_util.h>
/* defines */
#define NUM_TEST_TASKS 2 /* # of test tasks to monitor */
/* # ticks to wait for test completion */
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
/* locals */
/*
* Note that semaphore group entries are arranged so that resultSems[TC_PASS]
* refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL.
@ -63,8 +57,6 @@ then announces the result of the test.
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
/* globals */
ksem_t regSem = REGRESSION_SEM;
ksem_t altSem = ALTERNATE_SEM;
ksem_t counterSem = COUNTER_SEM;

View file

@ -41,24 +41,18 @@ The following target pipe routine does not yet have a test case:
task_pipe_put_async()
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <tc_util.h>
#include <vxmicro.h>
#include <misc/util.h>
/* defines */
#define ONE_SECOND (sys_clock_ticks_per_sec)
#define IRQ_PRIORITY 3
#define PIPE_SIZE 256 /* This must match the value in the VPF file */
/* typedefs */
typedef struct {
int size; /* number of bytes to send/receive */
K_PIPE_OPTION options; /* options for task_pipe_XXX() APIs */
@ -66,9 +60,6 @@ typedef struct {
int rcode; /* expected return code */
} SIZE_EXPECT;
/* locals */
static char txBuffer[PIPE_SIZE + 32];
static char rxBuffer[PIPE_SIZE + 32];
@ -159,8 +150,6 @@ static SIZE_EXPECT timeout_cases[] = {
{PIPE_SIZE + 1, _0_TO_N, 0, RC_FAIL}
};
/* globals */
extern ksem_t regSem;
extern ksem_t altSem;
extern ksem_t counterSem;

View file

@ -38,16 +38,12 @@ This modules tests the following memory pool routines:
task_mem_pool_free()
*/
/* includes */
#include <tc_util.h>
#include <nanokernel.h>
#include <arch/cpu.h>
#include <vxmicro.h>
#include <misc/util.h>
/* defines */
#define ONE_SECOND (sys_clock_ticks_per_sec)
#define TENTH_SECOND (sys_clock_ticks_per_sec / 10)
@ -55,8 +51,6 @@ This modules tests the following memory pool routines:
#define DEFRAG_BLK_TEST 2222
/* typedefs */
typedef struct {
struct k_block *block; /* pointer to block data */
kmemory_pool_t poolId; /* pool ID */
@ -68,8 +62,6 @@ typedef struct {
typedef int (*poolBlockGetFunc_t)(struct k_block *, kmemory_pool_t, int, int32_t);
typedef int (*poolMoveBlockFunc_t)(struct k_block *, kmemory_pool_t);
/* locals */
static volatile int evidence = 0;
static struct k_block blockList[NUM_BLOCKS];

View file

@ -42,8 +42,6 @@ these semaphores until it detects a failure or the completion of all test tasks,
then announces the result of the test.
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <vxmicro.h>
@ -58,12 +56,8 @@ then announces the result of the test.
extern void testFiberInit(void);
extern struct nano_sem fiberSem; /* semaphore that allows test control the fiber */
/* defines */
#define NUM_TEST_TASKS 4 /* # of test tasks to monitor */
/* locals */
static ksem_t testIsrInfo;
static CMD_PKT_SET_INSTANCE(cmdPktSet, 2)
@ -75,8 +69,6 @@ static CMD_PKT_SET_INSTANCE(cmdPktSet, 2)
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
/* globals */
ksem_t simpleSem = SIMPLE_SEM;
ksem_t altSem = ALTTASK_SEM;
ksem_t hpSem = HIGH_PRI_SEM;

View file

@ -41,8 +41,6 @@ This modules tests the following semaphore routines:
isr_sem_give(), fiber_sem_give()
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <vxmicro.h>
@ -53,7 +51,6 @@ This modules tests the following semaphore routines:
extern void trigger_isrSemaSignal(ksem_t semaphore);
extern void releaseTestFiber(void);
/* defines */
#define N_TESTS 10 /* number of tests to run */
#define OBJ_TIMEOUT SECONDS(1)

View file

@ -36,12 +36,10 @@ The module implements functions for the fiber that tests
semaphore signaling
*/
/* includes */
#include <nanokernel.h>
#include <arch/cpu.h>
#include <vxmicro.h>
/* defines */
#define N_TESTS 10 /* number of tests to run */
#define FIBER_PRIORITY 6
#define FIBER_STACK_SIZE 1024
@ -49,7 +47,6 @@ semaphore signaling
/* exports */
struct nano_sem fiberSem; /* semaphore that allows test control the fiber */
/* locals */
extern ksem_t simpleSem;
extern ksem_t semList[];

View file

@ -35,13 +35,9 @@ DESCRIPTION
This module contains the code for testing sprintf() functionality.
*/
/* includes */
#include <tc_util.h>
#include <stdio.h>
/* defines */
#define DEADBEEF 0xdeadbeef
#define DEADBEEF_LHEX_ALT_STR "0xdeadbeef"
@ -68,8 +64,6 @@ This module contains the code for testing sprintf() functionality.
#define PRINTF_MAX_STRING_LENGTH 200
/* typedefs */
typedef union {
double d;
struct {

View file

@ -46,20 +46,15 @@ DESCRIPTION
prints out a short string couple times.
*/
/* includes */
#include <tc_util.h>
#ifdef CONFIG_MICROKERNEL
#include <vxmicro.h>
/* locals */
#else
#include <arch/cpu.h>
/* defines */
#define STACKSIZE 1024
/* locals */
char __stack fiberStack[STACKSIZE];
#endif /* CONFIG_MICROKERNEL */
@ -67,7 +62,6 @@ char __stack fiberStack[STACKSIZE];
static int count = 0;
static int tcRC = TC_PASS;
/* forward declarations */
void check_input(const char *name, const char *input);
/*******************************************************************************

View file

@ -35,8 +35,6 @@ DESCRIPTION
Ensures interrupt and exception stubs are installed correctly.
*/
/* includes */
#include <tc_util.h>
#include <nanokernel.h>
@ -52,8 +50,6 @@ Ensures interrupt and exception stubs are installed correctly.
#include <vxmicro.h>
#endif
/* defines */
/* These vectors are somewhat arbitrary. We try and use unused vectors */
#define TEST_SOFT_INT 62
#define TEST_SPUR_INT 63
@ -69,8 +65,6 @@ extern void *exc_divide_error_handlerStub;
NANO_CPU_INT_REGISTER(nanoIntStub, TEST_SOFT_INT, 0);
/* locals */
static volatile int excHandlerExecuted;
static volatile int intHandlerExecuted;
/* Assume the spurious interrupt handler will execute and abort the task/fiber */

View file

@ -38,8 +38,6 @@ This module tests the following task APIs:
task_sleep(), task_yield()
*/
/* includes */
#include <tc_util.h>
#include <vxmicro.h>
#include <arch/cpu.h>
@ -50,8 +48,6 @@ This module tests the following task APIs:
#include <irq_test_common.h>
#include <util_test_common.h>
/* defines */
#define RT_PRIO 10 /* RegressionTask prio - must match prj.vpf */
#define HT_PRIO 20 /* HelperTask prio - must match prj.vpf */
@ -60,15 +56,11 @@ This module tests the following task APIs:
#define CMD_TASKID 0
#define CMD_PRIORITY 1
/* typedefs */
typedef struct {
int cmd;
int data;
} ISR_INFO;
/* locals */
static vvfn _trigger_isrTaskCommand = (vvfn)sw_isr_trigger_0;
static ISR_INFO isrInfo;

View file

@ -48,8 +48,6 @@
/* # ticks to wait for test completion */
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
/* locals */
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
static ksem_t rdySem = SEM_RDY;

View file

@ -39,8 +39,6 @@ This module tests the following ukernel timer routines:
task_tick_delta(), task_tick_get_32()
*/
/* includes */
#include <tc_util.h>
#include <vxmicro.h>
@ -51,8 +49,6 @@ extern struct nano_lifo _k_timer_free; /* For white box testing only */
#define WITHIN_ERROR(var, target, epsilon) \
(((var) >= (target)) && ((var) <= (target) + (epsilon)))
/* locals */
static ktimer_t pTimer[NTIMERS + 1];
/*******************************************************************************

View file

@ -38,8 +38,6 @@ working. However, the test does do some some testing on
global variables for completeness sake.
*/
/* includes */
#include <tc_util.h>
#include <nanokernel.h>
#include "test.h"

View file

@ -36,8 +36,6 @@ This module contains support code for the XIP regression
test.
*/
/* includes */
#include <nanokernel.h>
#include "test.h"

View file

@ -37,8 +37,6 @@ volatile int i = 0; /* counter used by background task */
#ifndef TEST_min
/* includes */
#include <misc/printk.h>
#include <arch/cpu.h>
#include <stdio.h>
@ -51,8 +49,6 @@ volatile int i = 0; /* counter used by background task */
#endif /* __GNUC__ */
#endif /* TEST_reg */
/* defines */
#define IRQ_PRIORITY 3
#define TEST_SOFT_INT 64
@ -68,8 +64,6 @@ volatile int i = 0; /* counter used by background task */
#define MESSAGE "Running regular nanokernel configuration\n"
#endif /* TEST_max */
/* typedefs */
typedef void* (*pfunc) (void*);
/* variables */

View file

@ -39,8 +39,6 @@ semaphores.
The ISRs are installed at build time, directly in the vector table.
*/
/* includes */
#if !defined(CONFIG_CPU_CORTEXM3)
#error project can only run on Cortex-M3
#endif

View file

@ -41,8 +41,6 @@ This module tests the following CPU and context related routines:
irq_enable(), irq_disable(),
*/
/* includes */
#include <tc_util.h>
#include <nanok.h>
#include <arch/cpu.h>
@ -61,8 +59,6 @@ This module tests the following CPU and context related routines:
#include <board.h>
#endif
/* defines */
#define FIBER_STACKSIZE 2000
#define FIBER_PRIORITY 4
@ -88,8 +84,6 @@ This module tests the following CPU and context related routines:
#error Timer type is not defined for this BSP
#endif
/* typedefs */
typedef struct {
int command; /* command to process */
int error; /* error value (if any) */
@ -102,8 +96,6 @@ typedef struct {
typedef int (* disable_interrupt_func)(int);
typedef void (* enable_interrupt_func)(int);
/* locals */
/* Cortex-M3 does not implement connecting non-IRQ exception handlers */
#if !defined(CONFIG_CPU_CORTEXM3)
static NANO_CPU_EXC_STUB_DECL(nanoExcStub);

View file

@ -61,8 +61,6 @@ the queue and puts and gets one last item to the queue. All these are run
in ISR context.
*/
/* includes */
#include <tc_util.h>
#include <arch/cpu.h>
@ -72,8 +70,6 @@ in ISR context.
#include <irq_test_common.h>
#include <util_test_common.h>
/* defines */
#define STACKSIZE 2048
#define NUM_FIFO_ELEMENT 4
#define INVALID_DATA NULL
@ -82,15 +78,11 @@ in ISR context.
#define TCERR2 TC_ERROR("Didn't get back correct FIFO\n")
#define TCERR3 TC_ERROR("The queue should be empty!\n")
/* typedefs */
typedef struct {
struct nano_fifo *channel; /* FIFO channel */
void *data; /* pointer to data to add */
} ISR_FIFO_INFO;
/* globals */
char __stack fiberStack1[STACKSIZE];
char __stack fiberStack2[STACKSIZE];
char __stack fiberStack3[STACKSIZE];
@ -132,15 +124,11 @@ void * const pPutList2[NUM_FIFO_ELEMENT] = {
int retCode = TC_PASS;
/* locals */
static ISR_FIFO_INFO isrFifoInfo = {&nanoFifoObj, NULL};
static void (*_trigger_nano_isr_fifo_put)(void) = (vvfn)sw_isr_trigger_0;
static void (*_trigger_nano_isr_fifo_get)(void) = (vvfn)sw_isr_trigger_1;
/* forward declarations */
void fiber1(void);
void fiber2(void);
void fiber3(void);

View file

@ -52,8 +52,6 @@ Scenario #3:
These scenarios will be tested using a combinations of tasks, fibers and ISRs.
*/
/* includes */
#include <tc_util.h>
#include <arch/cpu.h>
@ -63,13 +61,9 @@ These scenarios will be tested using a combinations of tasks, fibers and ISRs.
#include <irq_test_common.h>
#include <util_test_common.h>
/* defines */
#define FIBER_STACKSIZE 2000
#define FIBER_PRIORITY 4
/* typedefs */
typedef struct {
struct nano_lifo *channel; /* LIFO channel */
void *data; /* pointer to data to add */
@ -80,8 +74,6 @@ typedef struct {
uint32_t data; /* miscellaneous data put on LIFO (not important) */
} LIFO_ITEM;
/* locals */
/* Items to be added/removed from LIFO during the test */
static LIFO_ITEM lifoItem[4] = {
{0, 1},

View file

@ -50,8 +50,6 @@ Scenario #3:
Multiple fibers pend on the same semaphore.
*/
/* includes */
#include <tc_util.h>
#include <arch/cpu.h>
@ -61,13 +59,9 @@ Scenario #3:
#include <irq_test_common.h>
#include <util_test_common.h>
/* defines */
#define FIBER_STACKSIZE 2000
#define FIBER_PRIORITY 4
/* typedefs */
typedef struct {
struct nano_sem *sem; /* ptr to semaphore */
int data; /* data */
@ -80,8 +74,6 @@ typedef enum {
STS_ISR_WOKE_TASK
} SEM_TEST_STATE;
/* locals */
static SEM_TEST_STATE semTestState;
static ISR_SEM_INFO isrSemInfo;
static struct nano_sem testSem;

View file

@ -60,8 +60,6 @@ it popped all data from queue1, push and pop one last item to the queue. All
these are run in ISR context.
*/
/* includes */
#include <tc_util.h>
#include <arch/cpu.h>
@ -71,7 +69,6 @@ these are run in ISR context.
#include <irq_test_common.h>
#include <util_test_common.h>
/* defines */
#define STACKSIZE 2048
#define NUM_STACK_ELEMENT 4
#define STARTNUM 1 /* Used to compute data to put in the stack */
@ -83,16 +80,12 @@ these are run in ISR context.
#define TCERR2 TC_ERROR("Didn't get back correct data\n")
#define TCERR3 TC_ERROR("The stack should be empty!\n")
/* typedefs */
typedef struct {
struct nano_stack *channel; /* STACK channel */
uint32_t data; /* data to add */
} ISR_STACK_INFO;
/* globals */
char fiberStack1[STACKSIZE];
char fiberStack2[STACKSIZE];
char fiberStack3[STACKSIZE];
@ -115,15 +108,11 @@ uint32_t stack2[NUM_STACK_ELEMENT];
void *timerData[1];
int retCode = TC_PASS;
/* locals */
static ISR_STACK_INFO isrStackInfo = {&nanoStackObj, 0};
static void (*_trigger_nano_isr_stack_push)(void) = (vvfn)sw_isr_trigger_0;
static void (*_trigger_nano_isr_stack_pop)(void) = (vvfn)sw_isr_trigger_1;
/* forward declarations */
void initData(void);
void fiber1(void);
void fiber2(void);

View file

@ -39,13 +39,9 @@ This module tests the following timer related routines:
nano_time_init(), nano_tick_get_32(), nano_cycle_get_32(), nano_tick_delta()
*/
/* includes */
#include <tc_util.h>
#include <arch/cpu.h>
/* defines */
#define TWO_SECONDS (2 * sys_clock_ticks_per_sec)
#define SIX_SECONDS (6 * sys_clock_ticks_per_sec)
@ -59,15 +55,11 @@ This module tests the following timer related routines:
#define FIBER2_STACKSIZE 2000
#define FIBER2_PRIORITY 10
/* typedefs */
typedef void (* timer_start_func)(struct nano_timer *, int);
typedef void (* timer_stop_func)(struct nano_timer *);
typedef void* (* timer_getw_func)(struct nano_timer *);
typedef void* (* timer_get_func)(struct nano_timer *);
/* locals */
static struct nano_timer timer;
static struct nano_timer shortTimer;
static struct nano_timer longTimer;