mirror of
https://github.com/kelvinlawson/atomthreads.git
synced 2026-03-21 11:31:51 +01:00
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:
@@ -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 - 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"));
|
||||
@@ -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 - 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"));
|
||||
@@ -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 - 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"));
|
||||
@@ -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 - 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"));
|
||||
@@ -293,4 +293,4 @@ static void test_thread_func (uint32_t param)
|
||||
{
|
||||
atomTimerDelay (SYSTEM_TICKS_PER_SEC);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user