Fix function declarations on samples

This commit fixes the coding style of the function declarations and aligning
the open and close brackets and change the style of parameter's documentation.

Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
Change-Id: I648d36eb29dafc7fcd87b8db01e682bea993e5d2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Yonattan Louise 2015-04-16 18:27:27 -05:00 committed by Anas Nashif
commit 16a2c5800d
19 changed files with 540 additions and 678 deletions

View file

@ -54,15 +54,16 @@ required by Security Development Lifecycle
* if either <src> or <dest> are NULL, or if the destination buffer <dest>
* is too small.
*
* \param dest destination buffer
* \param nDestElem number of elements in destination buffer
* \param src source buffer
* \param nElem number of elements to copy
*
* RETURNS: 0 on success, otherwise invokes _NanoFatalErrorHandler()
*/
errno_t __k_memcpy_s(
void *dest, /* destination buffer */
size_t nDestElem, /* # of elements in destination buffer */
const void *src, /* source buffer */
size_t nElem /* # of elements to copy */
)
errno_t __k_memcpy_s(void *dest, size_t nDestElem, const void *src,
size_t nElem)
{
if ((dest == NULL) || (src == NULL) || (nDestElem < nElem)) {
_NanoFatalErrorHandler(_NANO_ERR_INVALID_STRING_OP,
@ -86,12 +87,13 @@ errno_t __k_memcpy_s(
* enabled, returns the number of elements in the string <str> to a maximum
* value of <maxElem>. Note that if <str> is NULL, it returns 0.
*
* \param str string about which to find length
* \param maxElem maximum number of elements in the string
*
* RETURNS: number of elements in the null-terminated character string
*/
size_t __strlen_s(const char *str, /* string about which to find length */
size_t maxElem /* maximum # of elements in the string */
)
size_t __strlen_s(const char *str, size_t maxElem)
{
size_t len = 0; /* the calculated string length */
@ -117,15 +119,14 @@ size_t __strlen_s(const char *str, /* string about which to find length */
* if either <src> or <dest> are NULL, or if the buffer for destination string
* <dest> is too small.
*
* \param dest destination string buffer
* \param nDestElem number of elements in destination buffer
* \param src source string buffer
*
* RETURNS: 0 on success, otherwise invokes _NanoFatalErrorHandler()
*/
errno_t __strcpy_s
(
char * dest, /* destination string buffer */
size_t nDestElem, /* # of elements in destination buffer */
const char * src /* source string buffer */
)
errno_t __strcpy_s(char *dest, size_t nDestElem, const char *src)
{
int i = 0; /* loop counter */

View file

@ -53,12 +53,14 @@
#define SLEEPTIME 500
#define SLEEPTICKS (SLEEPTIME * sys_clock_ticks_per_sec / 1000)
void helloLoop
(
const char * taskname, /* task identification string */
ksem_t mySem, /* task's own semaphore */
ksem_t otherSem /* other task's semaphore */
)
/*
*
* \param taskname task identification string
* \param mySem task's own semaphore
* \param otherSem other task's semaphore
*
*/
void helloLoop(const char *taskname, ksem_t mySem, ksem_t otherSem)
{
while (1)
{

View file

@ -74,13 +74,12 @@ int criticalRtn (void)
*
* criticalLoop - common code for invoking task_offload_to_fiber()
*
* \param count number of critical section calls made thus far
*
* RETURNS: number of critical section calls made by task
*/
uint32_t criticalLoop
(
uint32_t count /* number of critical section calls made thus far */
)
uint32_t criticalLoop(uint32_t count)
{
int32_t ticks;

View file

@ -76,10 +76,7 @@ extern struct nano_sem fiberSem; /* semaphore that allows test control the fiber
* RETURNS: N/A
*/
void isr_event_signal_handler
(
void *data
)
void isr_event_signal_handler(void *data)
{
ISR_INFO *pInfo = (ISR_INFO *) data;
@ -370,13 +367,12 @@ int fiberEventSignalTest(void)
*
* eventHandler - handler to run on EVENT_ID event
*
* \param event signalled event
*
* RETURNS: <handlerRetVal>
*/
int eventHandler
(
int event /* signalled event */
)
int eventHandler(int event)
{
ARG_UNUSED(event);
@ -389,13 +385,12 @@ int eventHandler
*
* altEventHandler - handler to run on ALT_EVENT event
*
* \param event signalled event
*
* RETURNS: 1
*/
int altEventHandler
(
int event /* signalled event */
)
int altEventHandler(int event)
{
ARG_UNUSED(event);

View file

@ -107,14 +107,13 @@ void printMyData(void)
* This routine verifies current value against expected value
* and returns TRUE if they are the same.
*
* \param expectRetValue expect value
* \param currentRetValue current value
*
* RETURNS: TRUE, FALSE
*/
BOOL verifyRetValue
(
int expectRetValue, /* expect value */
int currentRetValue /* current value */
)
BOOL verifyRetValue(int expectRetValue, int currentRetValue)
{
return (expectRetValue == currentRetValue);
} /* verifyRetValue */
@ -141,19 +140,15 @@ void initMicroObjects(void)
* This routine fills the FIFO queue with myData array. This assumes the
* queue is empty before we put in elements.
*
* \param queue FIFO queue
* \param numElements Number of elements used to inserted into the queue
*
* RETURNS: TC_PASS, TC_FAIL
*
* Also updates tcRC when result is TC_FAIL.
*/
int fillFIFO
(
kfifo_t queue, /* FIFO queue */
int numElements /*
* number of elements used to inserted
* into the queue
*/
)
int fillFIFO(kfifo_t queue, int numElements)
{
int result = TC_PASS; /* TC_PASS or TC_FAIL for this function */
int retValue; /* return value from task_fifo_xxx APIs */
@ -289,14 +284,13 @@ exitTest4:
* that they are in the right order. Expect the dequeue order as: myData[0],
* myData[1].
*
* \param loopCnt number of elements passed to the for loop
*
* RETURNS: TC_PASS, TC_FAIL
*
* Also updates tcRC when result is TC_FAIL.
*/
int verifyQueueData
(
int loopCnt /* Number of elements passed to the for loop */
)
int verifyQueueData(int loopCnt)
{
int result = TC_PASS; /* TC_PASS or TC_FAIL for this function */
int retValue; /* task_fifo_xxx interface return value */

View file

@ -74,14 +74,13 @@ int testMapFreeAllBlocks(void **P);
* This routine verifies current value against expected value
* and returns TRUE if they are the same.
*
* \param expectRetValue expect value
* \param currentRetValue current value
*
* RETURNS: TRUE, FALSE
*/
BOOL verifyRetValue
(
int expectRetValue, /* expect value */
int currentRetValue /* current value */
)
BOOL verifyRetValue(int expectRetValue, int currentRetValue)
{
return (expectRetValue == currentRetValue);
@ -160,13 +159,12 @@ exitTest1:
*
* task_mem_map_alloc(), task_mem_map_used_get()
*
* \param p pointer to pointer of allocated blocks
*
* RETURNS: TC_PASS, TC_FAIL
*/
int testMapGetAllBlocks
(
void **p /* pointer to pointer of allocated blocks */
)
int testMapGetAllBlocks(void **p)
{
int retValue; /* task_mem_map_xxx interface return value */
void *errPtr; /* Pointer to block */
@ -233,13 +231,12 @@ int testMapGetAllBlocks
*
* task_mem_map_free(), task_mem_map_used_get()
*
* \param p pointer to pointer of allocated blocks
*
* RETURNS: TC_PASS, TC_FAIL
*/
int testMapFreeAllBlocks
(
void **p /* pointer to pointer of allocated blocks */
)
int testMapFreeAllBlocks(void **p)
{
int retValue; /* task_mem_map_xxx interface return value */
@ -289,12 +286,11 @@ int testMapFreeAllBlocks
*
* This routine prints out the pointers.
*
* \param pointer pointer to pointer of allocated blocks
*
* RETURNS: N/A
*/
void printPointers
(
void **pointer /* pointer to pointer of allocated blocks */
)
void printPointers(void **pointer)
{
TC_PRINT("%s: ", __func__);
for (int i = 0; i < NUMBLOCKS; i++) {

View file

@ -199,14 +199,13 @@ void microObjectsInit (void)
*
* receiveBufferCheck - check the contents of the receive buffer
*
* \param buffer pointer to buffer to check
* \param size number of bytes to check
*
* RETURNS: <size> on success, index of wrong character on failure
*/
int receiveBufferCheck
(
char * buffer, /* pointer to buffer to check */
int size /* number of bytes to check */
)
int receiveBufferCheck(char *buffer, int size)
{
int j; /* loop counter */
@ -225,16 +224,16 @@ int receiveBufferCheck
*
* pipePutHelperWork - helper routine to pipePutTest()
*
* \param singleItems testcase list (one item in the pipe)
* \param nSingles number of items in testcase
* \param manyItems testcase list (many items in the pipe)
* \param nMany number of items in testcase
*
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int pipePutHelperWork
(
SIZE_EXPECT * singleItems, /* testcase list (one item in the pipe) */
int nSingles, /* # of items in testcase */
SIZE_EXPECT * manyItems, /* testcase list (many items in the pipe) */
int nMany /* # of items in testcase */
)
int pipePutHelperWork(SIZE_EXPECT *singleItems, int nSingles,
SIZE_EXPECT *manyItems, int nMany)
{
int i; /* loop counter */
int j; /* loop counter */
@ -375,16 +374,16 @@ int pipePutHelper (void)
*
* This routine tests the task_pipe_put() API.
*
* \param singleItems testcase list (one item in the pipe)
* \param nSingles number of items in testcase
* \param manyItems testcase list (many items in the pipe)
* \param nMany number of items in testcase
*
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int pipePutTestWork
(
SIZE_EXPECT * singleItems, /* testcase list (one item in the pipe) */
int nSingles, /* # of items in testcase */
SIZE_EXPECT * manyItems, /* testcase list (many items in the pipe) */
int nMany /* # of items in testcase */
)
int pipePutTestWork(SIZE_EXPECT *singleItems, int nSingles,
SIZE_EXPECT *manyItems, int nMany)
{
int rv; /* return code from task_pipe_put() */
int i; /* loop counter */
@ -851,14 +850,13 @@ int pipeGetTest (void)
*
* pipeGetWaitHelperWork - test task_pipe_get_wait()
*
* \param items testcase list for task_pipe_get_wait()
* \param nItems number of items in list
*
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int pipeGetWaitHelperWork
(
SIZE_EXPECT * items, /* testcase list for task_pipe_get_wait() */
int nItems /* # of items in list */
)
int pipeGetWaitHelperWork(SIZE_EXPECT *items, int nItems)
{
int i; /* loop counter */
int rv; /* return value from task_pipe_put_wait() */
@ -921,14 +919,13 @@ int pipeGetWaitHelper (void)
*
* pipeGetWaitTestWork - test task_pipe_get_wait()
*
* \param items testcase list for task_pipe_get_wait()
* \param nItems number of items in list
*
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int pipeGetWaitTestWork
(
SIZE_EXPECT * items, /* testcase list for task_pipe_get_wait() */
int nItems /* # of items in list */
)
int pipeGetWaitTestWork(SIZE_EXPECT *items, int nItems)
{
int i; /* loop counter */
int rv; /* return code from task_pipe_get_wait() */

View file

@ -129,11 +129,7 @@ static TEST_CASE defrag[] = {
* RETURNS: 0 if the same, non-zero if not the same
*/
int blockCompare
(
struct k_block *b1,
struct k_block *b2
)
int blockCompare(struct k_block *b1, struct k_block *b2)
{
char *p1 = (char *) b1;
char *p2 = (char *) b2;
@ -157,13 +153,8 @@ int blockCompare
* RETURNS: task_mem_pool_alloc() return value
*/
int poolBlockGetFunc
(
struct k_block *block,
kmemory_pool_t pool,
int size,
int32_t unused
)
int poolBlockGetFunc(struct k_block *block, kmemory_pool_t pool, int size,
int32_t unused)
{
ARG_UNUSED(unused);
@ -177,13 +168,8 @@ int poolBlockGetFunc
* RETURNS: task_mem_pool_alloc_wait() return value
*/
int poolBlockGetWFunc
(
struct k_block *block,
kmemory_pool_t pool,
int size,
int32_t unused
)
int poolBlockGetWFunc(struct k_block *block, kmemory_pool_t pool, int size,
int32_t unused)
{
ARG_UNUSED(unused);
@ -197,13 +183,8 @@ int poolBlockGetWFunc
* RETURNS: task_mem_pool_alloc_wait_timeout() return value
*/
int poolBlockGetWTFunc
(
struct k_block *block,
kmemory_pool_t pool,
int size,
int32_t timeout
)
int poolBlockGetWTFunc(struct k_block *block, kmemory_pool_t pool,
int size, int32_t timeout)
{
return task_mem_pool_alloc_wait_timeout(block, pool, size, timeout);
}
@ -215,11 +196,7 @@ int poolBlockGetWTFunc
* RETURNS: N/A
*/
void freeBlocks
(
TEST_CASE *tests,
int nTests
)
void freeBlocks(TEST_CASE *tests, int nTests)
{
int i;
@ -237,13 +214,8 @@ void freeBlocks
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int poolBlockGetWork
(
char *string,
poolBlockGetFunc_t func,
TEST_CASE *tests,
int nTests
)
int poolBlockGetWork(char *string, poolBlockGetFunc_t func,
TEST_CASE *tests, int nTests)
{
int i;
int rv;
@ -414,11 +386,7 @@ int poolBlockGetWaitTest(void)
* RETURNS: task_mem_pool_move() return value
*/
int poolMoveBlock
(
struct k_block *block,
kmemory_pool_t pool
)
int poolMoveBlock(struct k_block *block, kmemory_pool_t pool)
{
return task_mem_pool_move(block, pool);
}
@ -430,11 +398,7 @@ int poolMoveBlock
* RETURNS: task_mem_pool_move_wait() return value
*/
int poolMoveBlockW
(
struct k_block *block,
kmemory_pool_t pool
)
int poolMoveBlockW(struct k_block *block, kmemory_pool_t pool)
{
return task_mem_pool_move_wait(block, pool);
}
@ -446,11 +410,7 @@ int poolMoveBlockW
* RETURNS: task_mem_pool_move_wait_timeout() return value
*/
int poolMoveBlockWT
(
struct k_block *block,
kmemory_pool_t pool
)
int poolMoveBlockWT(struct k_block *block, kmemory_pool_t pool)
{
return task_mem_pool_move_wait_timeout(block, pool, TENTH_SECOND);
}

View file

@ -172,13 +172,12 @@ void LowPriTaskEntry (void)
*
* testIsrHandler - ISR that gives specified semaphore
*
* \param isrData pointer to semaphore to be given
*
* RETURNS: N/A
*/
static void testIsrHandler
(
void *isrData /* pointer to semaphore to be given */
)
static void testIsrHandler(void *isrData)
{
isr_sem_give (*(ksem_t *)isrData, &CMD_PKT_SET(cmdPktSet));
}
@ -187,13 +186,12 @@ static void testIsrHandler
*
* trigger_isrSemaSignal - generate interrupt that gives specified semaphore
*
* \param semaphore semaphore to be given
*
* RETURNS: N/A
*/
void trigger_isrSemaSignal
(
ksem_t semaphore /* semaphore to be given */
)
void trigger_isrSemaSignal(ksem_t semaphore)
{
testIsrInfo = semaphore;
_trigger_isrSemaSignal ();

View file

@ -262,13 +262,7 @@ int sprintfDoubleTest (void)
* tvsnprintf - a test wrapper for vsnprintf()
*/
int tvsnprintf
(
char * s,
size_t len,
const char * format,
...
)
int tvsnprintf(char *s, size_t len, const char *format, ...)
{
va_list vargs;
int r;
@ -362,12 +356,7 @@ int vsnprintfTest (void)
* tvsprintf - a test wrapper for vsprintf()
*/
int tvsprintf
(
char * s,
const char * format,
...
)
int tvsprintf(char *s, const char *format, ...)
{
va_list vargs;
int r;

View file

@ -77,13 +77,12 @@ void check_input ( const char *name, const char *input );
* This function calls check_input 6 times with the input name and a short
* string, which is printed properly by check_input.
*
* \param name task or fiber identification string
*
* RETURNS: N/A
*/
void printLoop
(
const char * name /* task or fiber identification string */
)
void printLoop(const char *name)
{
while (count < 6)
{
@ -109,11 +108,7 @@ void printLoop
* RETURNS: N/A
*/
void check_input
(
const char *name,
const char *input
)
void check_input(const char *name, const char *input)
{
/* Stack will overflow when input is more than 16 characters */
char buf[16];

View file

@ -123,10 +123,7 @@ void isr_handler (void)
* RETURNS: N/A
*/
void exc_divide_error_handler
(
NANO_ESF * pEsf
)
void exc_divide_error_handler(NANO_ESF *pEsf)
{
pEsf->eip += 2;
excHandlerExecuted = 1; /* provide evidence that the handler executed */
@ -203,11 +200,7 @@ int nanoIdtStubTest (void)
#ifdef CONFIG_MICROKERNEL
void idtSpurTask(void)
#else
static void idtSpurFiber
(
int a1,
int a2
)
static void idtSpurFiber(int a1, int a2)
#endif
{
#ifndef CONFIG_MICROKERNEL

View file

@ -86,10 +86,7 @@ static volatile int mainTaskNotReady = 0;
* RETURNS: N/A
*/
void isr_task_command_handler
(
void * data
)
void isr_task_command_handler(void *data)
{
ISR_INFO * pInfo = (ISR_INFO *) data;
int value = -1;
@ -115,11 +112,7 @@ void isr_task_command_handler
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int isrAPIsTest
(
int taskId,
int taskPrio
)
int isrAPIsTest(int taskId, int taskPrio)
{
isrInfo.cmd = CMD_TASKID;
_trigger_isrTaskCommand ();
@ -149,11 +142,7 @@ int isrAPIsTest
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int taskMacrosTest
(
int taskId,
int taskPrio
)
int taskMacrosTest(int taskId, int taskPrio)
{
int value;

View file

@ -136,10 +136,7 @@ static void (*_trigger_isrHandler) (void) = (vvfn)sw_isr_trigger_0;
* RETURNS: N/A
*/
void isr_handler
(
void * data
)
void isr_handler(void *data)
{
ARG_UNUSED (data);
@ -175,10 +172,7 @@ void isr_handler
* RETURNS: N/A
*/
void exc_divide_error_handler
(
NANO_ESF * pEsf
)
void exc_divide_error_handler(NANO_ESF *pEsf)
{
pEsf->eip += 2;
excHandlerExecuted = 1; /* provide evidence that the handler executed */
@ -257,10 +251,7 @@ int nano_cpu_idleTest (void)
* RETURNS: irq_lock() return value
*/
int irq_lockWrapper
(
int unused
)
int irq_lockWrapper(int unused)
{
ARG_UNUSED (unused);
@ -274,10 +265,7 @@ int irq_lockWrapper
* RETURNS: N/A
*/
void irq_unlockWrapper
(
int imask
)
void irq_unlockWrapper(int imask)
{
irq_unlock (imask);
}
@ -289,10 +277,7 @@ void irq_unlockWrapper
* RETURNS: irq_lock_inline() return value
*/
int irq_lock_inlineWrapper
(
int unused
)
int irq_lock_inlineWrapper(int unused)
{
ARG_UNUSED (unused);
@ -306,10 +291,7 @@ int irq_lock_inlineWrapper
* RETURNS: N/A
*/
void irq_unlock_inlineWrapper
(
int imask
)
void irq_unlock_inlineWrapper(int imask)
{
irq_unlock_inline (imask);
}
@ -321,10 +303,7 @@ void irq_unlock_inlineWrapper
* RETURNS: <irq>
*/
int irq_disableWrapper
(
int irq
)
int irq_disableWrapper(int irq)
{
irq_disable (irq);
return irq;
@ -337,10 +316,7 @@ int irq_disableWrapper
* RETURNS: N/A
*/
void irq_enableWrapper
(
int irq
)
void irq_enableWrapper(int irq)
{
irq_enable (irq);
}
@ -356,12 +332,8 @@ void irq_enableWrapper
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int nanoCpuDisableInterruptsTest
(
disable_interrupt_func disableRtn,
enable_interrupt_func enableRtn,
int irq
)
int nanoCpuDisableInterruptsTest(disable_interrupt_func disableRtn,
enable_interrupt_func enableRtn, int irq)
{
unsigned long long count = 0;
unsigned long long i = 0;
@ -484,10 +456,7 @@ int nanoCtxTaskTest (void)
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int nanoCtxFiberTest
(
nano_context_id_t taskCtxId
)
int nanoCtxFiberTest(nano_context_id_t taskCtxId)
{
nano_context_id_t ctxId;
@ -536,14 +505,13 @@ int nanoCtxFiberTest
* This routine is the entry point to the fiber's helper fiber. It is used to
* help test the behaviour of the fiber_yield() routine.
*
* \param arg1 unused
* \param arg2 unused
*
* RETURNS: N/A
*/
static void fiberHelper
(
int arg1, /* unused */
int arg2 /* unused */
)
static void fiberHelper(int arg1, int arg2)
{
nano_context_id_t ctxId;
@ -655,14 +623,13 @@ int fiber_yieldTest (void)
*
* This routine is the entry point to the fiber started by the task.
*
* \param taskCtxId context ID of the spawning task
* \param arg1 unused
*
* RETURNS: N/A
*/
static void fiberEntry
(
int taskCtxId, /* context ID of the spawning task */
int arg1 /* unused */
)
static void fiberEntry(int taskCtxId, int arg1)
{
int rv;

View file

@ -158,13 +158,12 @@ void testTaskFifoGetW(void);
* This routine is the ISR handler for _trigger_nano_isr_fifo_put(). It adds
* an item to the FIFO in the context of an ISR.
*
* \param parameter pointer to ISR handler parameter
*
* RETURNS: N/A
*/
void isr_fifo_put
(
void * parameter /* ptr to ISR handler parameter */
)
void isr_fifo_put(void *parameter)
{
ISR_FIFO_INFO * pInfo = (ISR_FIFO_INFO *) parameter;
@ -178,13 +177,12 @@ void isr_fifo_put
* This routine is the ISR handler for _trigger_nano_isr_fifo_get(). It gets
* an item from the FIFO in the context of an ISR.
*
* \param parameter pointer to ISR handler parameter
*
* RETURNS: N/A
*/
void isr_fifo_get
(
void * parameter /* ptr to ISR handler parameter */
)
void isr_fifo_get(void *parameter)
{
ISR_FIFO_INFO * pInfo = (ISR_FIFO_INFO *) parameter;

View file

@ -111,13 +111,12 @@ static void (*_trigger_nano_isr_lifo_get) (void) = (vvfn)sw_isr_trigger_1;
* This routine is the ISR handler for _trigger_nano_isr_lifo_put(). It adds
* an item to the LIFO in the context of an ISR.
*
* \param data pointer to ISR handler parameter
*
* RETURNS: N/A
*/
void isr_lifo_put
(
void * data /* ptr to ISR handler parameter */
)
void isr_lifo_put(void *data)
{
ISR_LIFO_INFO * pInfo = (ISR_LIFO_INFO *) data;
@ -131,13 +130,12 @@ void isr_lifo_put
* This routine is the ISR handler for _trigger_nano_isr_lifo_get(). It gets
* an item from the LIFO in the context of an ISR.
*
* \param data pointer to ISR handler parameter
*
* RETURNS: N/A
*/
void isr_lifo_get
(
void * data /* ptr to ISR handler parameter */
)
void isr_lifo_get(void *data)
{
ISR_LIFO_INFO * pInfo = (ISR_LIFO_INFO *) data;
@ -298,14 +296,13 @@ errorReturn:
* NOTE: The fiber portion of the tests have higher priority than the task
* portion of the tests.
*
* \param arg1 unused
* \param arg2 unused
*
* RETURNS: N/A
*/
static void fiberEntry
(
int arg1, /* unused */
int arg2 /* unused */
)
static void fiberEntry(int arg1, int arg2)
{
int rv; /* return value from a test */

View file

@ -102,13 +102,12 @@ static void (*_trigger_nano_isr_sem_take) (void) = (vvfn)sw_isr_trigger_1;
* This routine is the ISR handler for _trigger_nano_isr_sem_take(). It takes a
* semaphore within the context of an ISR.
*
* \param data pointer to ISR handler parameter
*
* RETURNS: N/A
*/
void isr_sem_take
(
void * data /* ptr to ISR handler parameter */
)
void isr_sem_take(void *data)
{
ISR_SEM_INFO * pInfo = (ISR_SEM_INFO *) data;
@ -122,13 +121,12 @@ void isr_sem_take
* This routine is the ISR handler for _trigger_nano_isr_sem_take(). It gives a
* semaphore within the context of an ISR.
*
* \param data pointer to ISR handler parameter
*
* RETURNS: N/A
*/
void isr_sem_give
(
void * data /* ptr to ISR handler parameter */
)
void isr_sem_give(void *data)
{
ISR_SEM_INFO * pInfo = (ISR_SEM_INFO *) data;
@ -191,14 +189,13 @@ errorReturn:
* NOTE: The fiber portion of the tests have higher priority than the task
* portion of the tests.
*
* \param arg1 unused
* \param arg2 unused
*
* RETURNS: N/A
*/
static void fiberEntry
(
int arg1, /* unused */
int arg2 /* unused */
)
static void fiberEntry(int arg1, int arg2)
{
int rv; /* return value from a test */

View file

@ -163,13 +163,12 @@ void initData(void)
* This routine is the ISR handler for _trigger_nano_isr_stack_push(). It adds
* an item to the STACK in the context of an ISR.
*
* \param parameter pointer to ISR handler parameter
*
* RETURNS: N/A
*/
void isr_stack_push
(
void * parameter /* ptr to ISR handler parameter */
)
void isr_stack_push(void *parameter)
{
ISR_STACK_INFO * pInfo = (ISR_STACK_INFO *) parameter;
@ -185,13 +184,12 @@ void isr_stack_push
* an item from the STACK in the context of an ISR. If the queue is empty,
* it sets data to INVALID_DATA.
*
* \param parameter pointer to ISR handler parameter
*
* RETURNS: N/A
*/
void isr_stack_pop
(
void * parameter /* ptr to ISR handler parameter */
)
void isr_stack_pop(void *parameter)
{
ISR_STACK_INFO * pInfo = (ISR_STACK_INFO *) parameter;

View file

@ -117,18 +117,20 @@ void initNanoObjects (void)
*
* This routine can be considered as testing nano_node_tick_get_32(),
* nanoTimeElapsed() and nanoXXXTimerGetW() successful expiration cases.
*
* \param startRtn routine to start the timer
* \param waitRtn routine to get and wait for the timer
* \param getRtn routine to get the timer (no waiting)
* \param pTimer pointer to the timer
* \param pTimerData pointer to the expected timer data
* \param ticks number of ticks to wait
*
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int basicTimerWait
(
timer_start_func startRtn, /* routine to start the timer */
timer_getw_func waitRtn, /* routine to get and wait for the timer */
timer_get_func getRtn, /* routine to get the timer (no waiting) */
struct nano_timer *pTimer, /* ptr to the timer */
void * pTimerData, /* ptr to the expected timer data */
int ticks /* number of ticks to wait */
)
int basicTimerWait(timer_start_func startRtn, timer_getw_func waitRtn,
timer_get_func getRtn, struct nano_timer *pTimer,
void *pTimerData, int ticks)
{
uint64_t reftime; /* reference time for tick delta */
uint32_t tick; /* current tick */
@ -203,13 +205,12 @@ int basicTimerWait
*
* Four timers are used so that the various paths can be tested.
*
* \param startRtn routine to start the timers
*
* RETURNS: N/A
*/
void startTimers
(
timer_start_func startRtn /* routine to start the timers */
)
void startTimers(timer_start_func startRtn)
{
int tick; /* current tick */
@ -234,13 +235,12 @@ void startTimers
* expire. The timers are expected to expire in the following order:
* <shortTimer>, <timer>, <midTimer>, <longTimer>
*
* \param getRtn timer get routine (fiber or task)
*
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int busyWaitTimers
(
timer_get_func getRtn /* timer get routine (fiber or task) */
)
int busyWaitTimers(timer_get_func getRtn)
{
int numExpired = 0; /* # of expired timers */
void * result; /* value returned from <getRtn> */
@ -313,14 +313,13 @@ int busyWaitTimers
* exercise the code that removes timers from important locations in the list;
* these include the middle, the head, the tail, and the last item.
*
* \param stopRtn routine to stop timer (fiber or task)
* \param getRtn timer get routine (fiber or task)
*
* RETURNS: TC_PASS on success, TC_FAIL on failure
*/
int stopTimers
(
timer_stop_func stopRtn, /* routine to stop timer (fiber or task) */
timer_get_func getRtn /* timer get routine (fiber or task) */
)
int stopTimers(timer_stop_func stopRtn, timer_get_func getRtn)
{
int startTick; /* tick at which test starts */
int endTick; /* tick by which test should be completed */
@ -358,14 +357,13 @@ int stopTimers
* The second fiber has a lower priority than the first, but is still given
* precedence over the task.
*
* \param arg1 unused
* \param arg2 unused
*
* RETURNS: N/A
*/
static void fiber2Entry
(
int arg1, /* unused */
int arg2 /* unused */
)
static void fiber2Entry(int arg1, int arg2)
{
ARG_UNUSED (arg1);
ARG_UNUSED (arg2);
@ -380,14 +378,13 @@ static void fiber2Entry
* NOTE: The fiber portion of the tests have higher priority than the task
* portion of the tests.
*
* \param arg1 unused
* \param arg2 unused
*
* RETURNS: N/A
*/
static void fiberEntry
(
int arg1, /* unused */
int arg2 /* unused */
)
static void fiberEntry(int arg1, int arg2)
{
int rv; /* return value from a test */
void *result; /* return value from timer wait routine */