Merge remote-tracking branch 'kelvin_atomthreads/master'

Conflicts:
	tests/kern1.c
	tests/kern3.c
	tests/kern4.c
	tests/mutex1.c
	tests/mutex2.c
	tests/mutex3.c
	tests/mutex4.c
	tests/mutex5.c
	tests/mutex6.c
	tests/mutex7.c
	tests/mutex8.c
	tests/mutex9.c
	tests/queue2.c
	tests/queue3.c
	tests/queue5.c
	tests/queue6.c
	tests/queue7.c
	tests/queue9.c
	tests/sem1.c
	tests/sem3.c
	tests/sem4.c
	tests/sem5.c
	tests/sem6.c
	tests/sem7.c
	tests/sem8.c
	tests/sem9.c
	tests/timer2.c
This commit is contained in:
Natie van Rooyen
2012-09-27 11:33:36 +02:00
122 changed files with 8602 additions and 291 deletions

View File

@@ -1,11 +1,11 @@
---------------------------------------------------------------------------
Library: Atomthreads
Author: Kelvin Lawson <kelvinl@users.sf.net>
Website: http://atomthreads.com
License: BSD Revised
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Library: Atomthreads
Author: Kelvin Lawson <info@atomthreads.com>
Website: http://atomthreads.com
License: BSD Revised
---------------------------------------------------------------------------
AUTOMATED TEST SUITE
@@ -20,7 +20,7 @@ Developers of new CPU architecture ports can take advantage of the thorough
coverage provided by these tests to considerably speed up development and
validation time.
---------------------------------------------------------------------------
---------------------------------------------------------------------------
HOW TO RUN THE TESTS
@@ -29,7 +29,7 @@ folder. Instructions are included in the README file for each port, which
describes the process for building test applications as well as downloading
to and running the tests on the target device.
---------------------------------------------------------------------------
---------------------------------------------------------------------------
WRITING ADDITIONAL TESTS
@@ -50,5 +50,5 @@ modules which do not consume large amounts of processor resource. For
example the number of test threads should ideally be kept low in order to
allow smaller systems to accommodate the thread stack requirements.
---------------------------------------------------------------------------
---------------------------------------------------------------------------

View File

@@ -28,7 +28,6 @@
*/
#include <stddef.h>
#include "atom.h"
#include "atomtests.h"
@@ -64,8 +63,8 @@ uint32_t test_start (void)
/* atomThreadCreate: Pass a bad TCB pointer */
if (atomThreadCreate (NULL, TEST_THREAD_PRIO, test_thread_func, 0,
&test_thread_stack[TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_ERR_PARAM)
&test_thread_stack[0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_ERR_PARAM)
{
ATOMLOG (_STR("Bad TCB check\n"));
failures++;
@@ -73,8 +72,8 @@ uint32_t test_start (void)
/* atomThreadCreate: Pass a bad entry point */
if (atomThreadCreate (&tcb1, TEST_THREAD_PRIO, NULL, 0,
&test_thread_stack[TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_ERR_PARAM)
&test_thread_stack[0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_ERR_PARAM)
{
ATOMLOG (_STR("Bad entry check\n"));
failures++;
@@ -82,7 +81,7 @@ uint32_t test_start (void)
/* atomThreadCreate: Pass a bad stack pointer */
if (atomThreadCreate (&tcb1, TEST_THREAD_PRIO, test_thread_func, 0,
NULL, TEST_THREAD_STACK_SIZE) != ATOM_ERR_PARAM)
NULL, TEST_THREAD_STACK_SIZE, TRUE) != ATOM_ERR_PARAM)
{
ATOMLOG (_STR("Bad stack ptr check\n"));
failures++;
@@ -90,7 +89,7 @@ uint32_t test_start (void)
/* atomThreadCreate: Pass a bad stack size */
if (atomThreadCreate (&tcb1, TEST_THREAD_PRIO, test_thread_func, 0,
&test_thread_stack[TEST_THREAD_STACK_SIZE - sizeof(uint32_t)], 0) != ATOM_ERR_PARAM)
&test_thread_stack[0], 0, TRUE) != ATOM_ERR_PARAM)
{
ATOMLOG (_STR("Bad stack size check\n"));
failures++;

View File

@@ -95,8 +95,8 @@ uint32_t test_start (void)
/* Create low priority thread */
if (atomThreadCreate (&tcb[0], 253, test_thread_func, 0,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
ATOMLOG (_STR("Bad thread create\n"));
failures++;
@@ -104,8 +104,8 @@ uint32_t test_start (void)
/* Create high priority thread */
else if (atomThreadCreate (&tcb[1], 252, test_thread_func, 1,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
ATOMLOG (_STR("Bad thread create\n"));
failures++;

View File

@@ -97,29 +97,29 @@ uint32_t test_start (void)
* a spell in which this thread was run.
*/
if (atomThreadCreate (&tcb[0], TEST_THREAD_PRIO + 1, test_thread_func, 0,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
ATOMLOG (_STR("Bad thread create\n"));
failures++;
}
else if (atomThreadCreate (&tcb[1], TEST_THREAD_PRIO + 1, test_thread_func, 1,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
ATOMLOG (_STR("Bad thread create\n"));
failures++;
}
else if (atomThreadCreate (&tcb[2], TEST_THREAD_PRIO + 1, test_thread_func, 2,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
ATOMLOG (_STR("Bad thread create\n"));
failures++;
}
else if (atomThreadCreate (&tcb[3], TEST_THREAD_PRIO + 1, test_thread_func, 3,
&test_thread_stack[3][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[3][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
ATOMLOG (_STR("Bad thread create\n"));
failures++;

View File

@@ -27,7 +27,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stddef.h>
#include "atom.h"
#include "atommutex.h"
#include "atomtests.h"
@@ -138,8 +137,8 @@ uint32_t test_start (void)
}
else if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test1_thread_func, 0,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 1\n"));
@@ -201,8 +200,8 @@ uint32_t test_start (void)
}
else if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test2_thread_func, 0,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 2\n"));

View File

@@ -28,7 +28,6 @@
*/
#include <stddef.h>
#include "atom.h"
#include "atommutex.h"
#include "atomtests.h"
@@ -144,8 +143,8 @@ uint32_t test_start (void)
/* Create a test thread, the sole purpose of which is to own mutex2 */
g_owned = 0;
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 0,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 1\n"));

View File

@@ -108,8 +108,8 @@ uint32_t test_start (void)
{
/* Create Thread 1 (lower priority thread A) */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO+1, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -121,8 +121,8 @@ uint32_t test_start (void)
/* Create Thread 2 (lower priority thread B) */
if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO+1, test_thread_func, 2,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -134,8 +134,8 @@ uint32_t test_start (void)
/* Create Thread 3 (higher priority thread A) */
if (atomThreadCreate(&tcb[2], TEST_THREAD_PRIO, test_thread_func, 3,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -147,8 +147,8 @@ uint32_t test_start (void)
/* Create Thread 4 (higher priority thread B) */
if (atomThreadCreate(&tcb[3], TEST_THREAD_PRIO, test_thread_func, 4,
&test_thread_stack[3][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[3][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -288,4 +288,4 @@ static void test_thread_func (uint32_t param)
{
atomTimerDelay (SYSTEM_TICKS_PER_SEC);
}
}
}

View File

@@ -101,8 +101,8 @@ uint32_t test_start (void)
/* Create Thread 1 */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -113,8 +113,8 @@ uint32_t test_start (void)
/* Create Thread 2 */
if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test_thread_func, 2,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -125,8 +125,8 @@ uint32_t test_start (void)
/* Create Thread 3 */
if (atomThreadCreate(&tcb[2], TEST_THREAD_PRIO, test_thread_func, 3,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -137,8 +137,8 @@ uint32_t test_start (void)
/* Create Thread 4 */
if (atomThreadCreate(&tcb[3], TEST_THREAD_PRIO, test_thread_func, 4,
&test_thread_stack[3][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[3][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -293,4 +293,4 @@ static void test_thread_func (uint32_t param)
{
atomTimerDelay (SYSTEM_TICKS_PER_SEC);
}
}
}

View File

@@ -95,8 +95,8 @@ uint32_t test_start (void)
/* Create second thread */
else if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -299,4 +299,4 @@ static void test_thread_func (uint32_t param)
{
atomTimerDelay (SYSTEM_TICKS_PER_SEC);
}
}
}

View File

@@ -100,8 +100,8 @@ uint32_t test_start (void)
/* Create second thread */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -290,4 +290,4 @@ static void test_thread_func (uint32_t param)
{
atomTimerDelay (SYSTEM_TICKS_PER_SEC);
}
}
}

View File

@@ -28,7 +28,6 @@
*/
#include <stddef.h>
#include "atom.h"
#include "atomtests.h"
#include "atommutex.h"
@@ -94,8 +93,8 @@ uint32_t test_start (void)
/* Create second thread */
else if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));

View File

@@ -94,8 +94,8 @@ uint32_t test_start (void)
/* Create test thread 1 */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 0,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 1\n"));
@@ -104,8 +104,8 @@ uint32_t test_start (void)
/* Create test thread 2 */
else if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 2\n"));
@@ -114,8 +114,8 @@ uint32_t test_start (void)
/* Create test thread 3 */
else if (atomThreadCreate(&tcb[2], TEST_THREAD_PRIO, test_thread_func, 2,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 3\n"));

View File

@@ -88,8 +88,8 @@ uint32_t test_start (void)
/* Create second thread */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));

View File

@@ -28,7 +28,6 @@
*/
#include <stddef.h>
#include "atom.h"
#include "atomqueue.h"
#include "atomtests.h"

View File

@@ -90,8 +90,8 @@ uint32_t test_start (void)
/* Create a test thread that will block because the queue is empty */
else if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test1_thread_func, 0,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 1\n"));
@@ -147,8 +147,8 @@ uint32_t test_start (void)
/* Create a test thread that will block because the queue is empty */
else if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test2_thread_func, 0,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 2\n"));

View File

@@ -107,8 +107,8 @@ uint32_t test_start (void)
/* Create a test thread that will block because the queue is full */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test1_thread_func, 0,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 1\n"));
@@ -178,8 +178,8 @@ uint32_t test_start (void)
/* Create a test thread that will block because the queue is full */
if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test2_thread_func, 0,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 2\n"));

View File

@@ -28,7 +28,6 @@
*/
#include <stddef.h>
#include "atom.h"
#include "atomqueue.h"
#include "atomtests.h"

View File

@@ -34,7 +34,7 @@
/* Number of queue entries */
#define QUEUE_ENTRIES 8
#define QUEUE_ENTRIES 4
/* Number of test threads */
@@ -115,8 +115,8 @@ uint32_t test_start (void)
/* Create Thread 1 (lower priority thread A) */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO+1, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -128,8 +128,8 @@ uint32_t test_start (void)
/* Create Thread 2 (lower priority thread B) */
if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO+1, test_thread_func, 2,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -141,8 +141,8 @@ uint32_t test_start (void)
/* Create Thread 3 (higher priority thread A) */
if (atomThreadCreate(&tcb[2], TEST_THREAD_PRIO, test_thread_func, 3,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -154,8 +154,8 @@ uint32_t test_start (void)
/* Create Thread 4 (higher priority thread B) */
if (atomThreadCreate(&tcb[3], TEST_THREAD_PRIO, test_thread_func, 4,
&test_thread_stack[3][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[3][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));

View File

@@ -107,8 +107,8 @@ uint32_t test_start (void)
/* Create a test thread that will block because the queue is empty */
else if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO + 1, test1_thread_func, 0,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 1\n"));

View File

@@ -94,8 +94,8 @@ uint32_t test_start (void)
/* Create test thread 1 */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 0,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 1\n"));
@@ -104,8 +104,8 @@ uint32_t test_start (void)
/* Create test thread 2 */
else if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 2\n"));
@@ -114,8 +114,8 @@ uint32_t test_start (void)
/* Create test thread 3 */
else if (atomThreadCreate(&tcb[2], TEST_THREAD_PRIO, test_thread_func, 2,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 3\n"));

View File

@@ -39,7 +39,7 @@
/* Test queue size */
#define QUEUE_ENTRIES 8
#define QUEUE_ENTRIES 4
/* Number of test threads */
@@ -103,8 +103,8 @@ uint32_t test_start (void)
{
/* Create Thread 1 */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -115,8 +115,8 @@ uint32_t test_start (void)
/* Create Thread 2 */
if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test_thread_func, 2,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -127,8 +127,8 @@ uint32_t test_start (void)
/* Create Thread 3 */
if (atomThreadCreate(&tcb[2], TEST_THREAD_PRIO, test_thread_func, 3,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -139,8 +139,8 @@ uint32_t test_start (void)
/* Create Thread 4 */
if (atomThreadCreate(&tcb[3], TEST_THREAD_PRIO, test_thread_func, 4,
&test_thread_stack[3][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[3][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));

View File

@@ -28,7 +28,6 @@
*/
#include <stddef.h>
#include "atom.h"
#include "atomsem.h"
#include "atomtests.h"
@@ -134,8 +133,8 @@ uint32_t test_start (void)
}
else if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test1_thread_func, 0,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 1\n"));
@@ -201,8 +200,8 @@ uint32_t test_start (void)
failures++;
}
else if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test2_thread_func, 0,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 2\n"));

View File

@@ -28,7 +28,6 @@
*/
#include <stddef.h>
#include "atom.h"
#include "atomsem.h"
#include "atomtests.h"
@@ -321,4 +320,4 @@ static void testCallback (POINTER cb_data)
*/
}
}
}

View File

@@ -103,8 +103,8 @@ uint32_t test_start (void)
{
/* Create Thread 1 (lower priority thread A) */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO+1, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -116,8 +116,8 @@ uint32_t test_start (void)
/* Create Thread 2 (lower priority thread B) */
if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO+1, test_thread_func, 2,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -129,8 +129,8 @@ uint32_t test_start (void)
/* Create Thread 3 (higher priority thread A) */
if (atomThreadCreate(&tcb[2], TEST_THREAD_PRIO, test_thread_func, 3,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -142,8 +142,8 @@ uint32_t test_start (void)
/* Create Thread 4 (higher priority thread B) */
if (atomThreadCreate(&tcb[3], TEST_THREAD_PRIO, test_thread_func, 4,
&test_thread_stack[3][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[3][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));

View File

@@ -97,8 +97,8 @@ uint32_t test_start (void)
{
/* Create Thread 1 */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -109,8 +109,8 @@ uint32_t test_start (void)
/* Create Thread 2 */
if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test_thread_func, 2,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -121,8 +121,8 @@ uint32_t test_start (void)
/* Create Thread 3 */
if (atomThreadCreate(&tcb[2], TEST_THREAD_PRIO, test_thread_func, 3,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));
@@ -133,8 +133,8 @@ uint32_t test_start (void)
/* Create Thread 4 */
if (atomThreadCreate(&tcb[3], TEST_THREAD_PRIO, test_thread_func, 4,
&test_thread_stack[3][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[3][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));

View File

@@ -84,8 +84,8 @@ uint32_t test_start (void)
{
/* Create second thread */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));

View File

@@ -94,8 +94,8 @@ uint32_t test_start (void)
/* Create second thread */
else if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));

View File

@@ -100,8 +100,8 @@ uint32_t test_start (void)
/* Create second thread */
else if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread\n"));

View File

@@ -110,8 +110,8 @@ uint32_t test_start (void)
/* Create thread 1: Higher priority than main thread so should sleep */
else if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO - 1, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 1\n"));
@@ -120,8 +120,8 @@ uint32_t test_start (void)
/* Create thread 2: Same priority as main thread so should not sleep */
else if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test_thread_func, 0,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 2\n"));
@@ -130,8 +130,8 @@ uint32_t test_start (void)
/* Create thread 3: Same priority as main thread so should not sleep */
else if (atomThreadCreate(&tcb[2], TEST_THREAD_PRIO + 1, test_thread_func, 0,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 3\n"));

View File

@@ -87,8 +87,8 @@ uint32_t test_start (void)
{
/* Create test thread 1 */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 0,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 1\n"));
@@ -97,8 +97,8 @@ uint32_t test_start (void)
/* Create test thread 2 */
else if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 2\n"));
@@ -107,8 +107,8 @@ uint32_t test_start (void)
/* Create test thread 3 */
else if (atomThreadCreate(&tcb[2], TEST_THREAD_PRIO, test_thread_func, 2,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Error creating test thread 3\n"));

View File

@@ -28,7 +28,6 @@
*/
#include <stddef.h>
#include "atom.h"
#include "atomsem.h"
#include "atomtimer.h"
@@ -246,4 +245,4 @@ static void testCallback (POINTER cb_data)
*/
}
}
}

View File

@@ -73,8 +73,8 @@ uint32_t test_start (void)
/* Create Thread 1 */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Thread1\n"));
@@ -83,8 +83,8 @@ uint32_t test_start (void)
/* Create Thread 2 */
if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO, test_thread_func, 2,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Thread2\n"));
@@ -93,8 +93,8 @@ uint32_t test_start (void)
/* Create Thread 3 */
if (atomThreadCreate(&tcb[2], TEST_THREAD_PRIO, test_thread_func, 3,
&test_thread_stack[2][TEST_THREAD_STACK_SIZE - sizeof(uint32_t)],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Thread3\n"));

View File

@@ -28,7 +28,6 @@
*/
#include <stddef.h>
#include "atom.h"
#include "atomsem.h"
#include "atomtimer.h"
@@ -240,4 +239,4 @@ static void testCallback (POINTER cb_data)
*/
}
}
}

View File

@@ -28,7 +28,6 @@
*/
#include <stddef.h>
#include "atom.h"
#include "atomsem.h"
#include "atomtimer.h"
@@ -138,4 +137,4 @@ static void testCallback (POINTER cb_data)
{
/* Callback was called */
callback_ran_flag = TRUE;
}
}