Add support for architectures with stack alignment requirements in preparation for various 32 bit ports.

NOTE: The atomThreadCreate() and atmoOSInit() APIs have changed to take stack_bottom rather than stack_top and to allow optional stack-checking on a per-thread basis.
This commit is contained in:
Kelvin Lawson
2011-05-27 16:41:18 +01:00
committed by Himanshu Chauhan
parent f686c6527a
commit d5a8c186b0
34 changed files with 199 additions and 173 deletions

View File

@@ -63,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 - 1],
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++;
@@ -72,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 - 1],
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++;
@@ -81,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++;
@@ -89,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 - 1], 0) != ATOM_ERR_PARAM)
&test_thread_stack[0], 0, TRUE) != ATOM_ERR_PARAM)
{
ATOMLOG (_STR("Bad stack size check\n"));
failures++;

View File

@@ -98,8 +98,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 - 1],
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++;
@@ -107,8 +107,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 - 1],
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

@@ -100,29 +100,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 - 1],
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 - 1],
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 - 1],
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 - 1],
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

@@ -136,8 +136,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 - 1],
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"));
@@ -199,8 +199,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 - 1],
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

@@ -143,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 - 1],
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

@@ -111,8 +111,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 - 1],
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"));
@@ -124,8 +124,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 - 1],
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"));
@@ -137,8 +137,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 - 1],
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"));
@@ -150,8 +150,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 - 1],
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

@@ -100,8 +100,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 - 1],
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"));
@@ -112,8 +112,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 - 1],
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"));
@@ -124,8 +124,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 - 1],
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"));
@@ -136,8 +136,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 - 1],
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

@@ -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 - 1],
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

@@ -99,8 +99,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 - 1],
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

@@ -93,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 - 1],
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

@@ -93,8 +93,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 - 1],
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"));
@@ -103,8 +103,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 - 1],
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"));
@@ -113,8 +113,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 - 1],
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 second thread */
if (atomThreadCreate(&tcb[0], TEST_THREAD_PRIO, test_thread_func, 1,
&test_thread_stack[0][TEST_THREAD_STACK_SIZE - 1],
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

@@ -89,8 +89,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 - 1],
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"));
@@ -146,8 +146,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 - 1],
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

@@ -106,8 +106,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 - 1],
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"));
@@ -177,8 +177,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 - 1],
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

@@ -114,8 +114,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 - 1],
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"));
@@ -127,8 +127,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 - 1],
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"));
@@ -140,8 +140,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 - 1],
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"));
@@ -153,8 +153,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 - 1],
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

@@ -106,8 +106,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 - 1],
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

@@ -93,8 +93,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 - 1],
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"));
@@ -103,8 +103,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 - 1],
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"));
@@ -113,8 +113,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 - 1],
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

@@ -102,8 +102,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 - 1],
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"));
@@ -114,8 +114,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 - 1],
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"));
@@ -126,8 +126,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 - 1],
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"));
@@ -138,8 +138,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 - 1],
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

@@ -133,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 - 1],
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"));
@@ -200,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 - 1],
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

@@ -102,8 +102,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 - 1],
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 (lower priority thread B) */
if (atomThreadCreate(&tcb[1], TEST_THREAD_PRIO+1, test_thread_func, 2,
&test_thread_stack[1][TEST_THREAD_STACK_SIZE - 1],
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"));
@@ -128,8 +128,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 - 1],
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"));
@@ -141,8 +141,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 - 1],
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

@@ -96,8 +96,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 - 1],
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"));
@@ -108,8 +108,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 - 1],
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"));
@@ -120,8 +120,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 - 1],
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"));
@@ -132,8 +132,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 - 1],
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

@@ -83,8 +83,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 - 1],
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

@@ -93,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 - 1],
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

@@ -99,8 +99,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 - 1],
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

@@ -109,8 +109,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 - 1],
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"));
@@ -119,8 +119,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 - 1],
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"));
@@ -129,8 +129,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 - 1],
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

@@ -86,8 +86,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 - 1],
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"));
@@ -96,8 +96,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 - 1],
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"));
@@ -106,8 +106,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 - 1],
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

@@ -72,8 +72,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 - 1],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[0][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Thread1\n"));
@@ -82,8 +82,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 - 1],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[1][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Thread2\n"));
@@ -92,8 +92,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 - 1],
TEST_THREAD_STACK_SIZE) != ATOM_OK)
&test_thread_stack[2][0],
TEST_THREAD_STACK_SIZE, TRUE) != ATOM_OK)
{
/* Fail */
ATOMLOG (_STR("Thread3\n"));