git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9048 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
1e64833ed3
commit
1558adfccd
|
@ -260,7 +260,7 @@ err = OS_TaskCreate(&tid,
|
||||||
test_assert(err == OS_ERR_NAME_TAKEN, "name conflict not detected");
|
test_assert(err == OS_ERR_NAME_TAKEN, "name conflict not detected");
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid,
|
err = OS_TaskCreate(&tid,
|
||||||
"another running thread",
|
"conflicting thread",
|
||||||
test_thread1,
|
test_thread1,
|
||||||
(uint32 *)wa_test1,
|
(uint32 *)wa_test1,
|
||||||
sizeof wa_test1,
|
sizeof wa_test1,
|
||||||
|
@ -316,43 +316,43 @@ test_assert_sequence("A", "task not executed");]]></value>
|
||||||
<value />
|
<value />
|
||||||
</tags>
|
</tags>
|
||||||
<code>
|
<code>
|
||||||
<value><![CDATA[int32 err;
|
<value><![CDATA[int32 err;
|
||||||
uint32 tid1, tid2, tid3, tid4;
|
uint32 tid1, tid2, tid3, tid4;
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid4,
|
err = OS_TaskCreate(&tid4,
|
||||||
"running thread 4",
|
"running thread 4",
|
||||||
test_thread4,
|
test_thread4,
|
||||||
(uint32 *)wa_test4,
|
(uint32 *)wa_test4,
|
||||||
sizeof wa_test4,
|
sizeof wa_test4,
|
||||||
TASKS_BASE_PRIORITY - 0,
|
TASKS_BASE_PRIORITY - 0,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 4 creation failed");
|
test_assert(err == OS_SUCCESS, "task 4 creation failed");
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid3,
|
err = OS_TaskCreate(&tid3,
|
||||||
"running thread 3",
|
"running thread 3",
|
||||||
test_thread3,
|
test_thread3,
|
||||||
(uint32 *)wa_test3,
|
(uint32 *)wa_test3,
|
||||||
sizeof wa_test3,
|
sizeof wa_test3,
|
||||||
TASKS_BASE_PRIORITY - 1,
|
TASKS_BASE_PRIORITY - 1,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 3 creation failed");
|
test_assert(err == OS_SUCCESS, "task 3 creation failed");
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid2,
|
err = OS_TaskCreate(&tid2,
|
||||||
"running thread 2",
|
"running thread 2",
|
||||||
test_thread2,
|
test_thread2,
|
||||||
(uint32 *)wa_test2,
|
(uint32 *)wa_test2,
|
||||||
sizeof wa_test2,
|
sizeof wa_test2,
|
||||||
TASKS_BASE_PRIORITY - 2,
|
TASKS_BASE_PRIORITY - 2,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 2 creation failed");
|
test_assert(err == OS_SUCCESS, "task 2 creation failed");
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid1,
|
err = OS_TaskCreate(&tid1,
|
||||||
"running thread 1",
|
"running thread 1",
|
||||||
test_thread1,
|
test_thread1,
|
||||||
(uint32 *)wa_test1,
|
(uint32 *)wa_test1,
|
||||||
sizeof wa_test1,
|
sizeof wa_test1,
|
||||||
TASKS_BASE_PRIORITY - 3,
|
TASKS_BASE_PRIORITY - 3,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 1 creation failed");]]></value>
|
test_assert(err == OS_SUCCESS, "task 1 creation failed");]]></value>
|
||||||
</code>
|
</code>
|
||||||
</step>
|
</step>
|
||||||
|
@ -364,7 +364,7 @@ test_assert(err == OS_SUCCESS, "task 1 creation failed");]]></value>
|
||||||
<value />
|
<value />
|
||||||
</tags>
|
</tags>
|
||||||
<code>
|
<code>
|
||||||
<value><![CDATA[OS_TaskDelay(5);
|
<value><![CDATA[OS_TaskDelay(5);
|
||||||
test_assert_sequence("ABCD", "task order violation");]]></value>
|
test_assert_sequence("ABCD", "task order violation");]]></value>
|
||||||
</code>
|
</code>
|
||||||
</step>
|
</step>
|
||||||
|
@ -376,43 +376,43 @@ test_assert_sequence("ABCD", "task order violation");]]></value>
|
||||||
<value />
|
<value />
|
||||||
</tags>
|
</tags>
|
||||||
<code>
|
<code>
|
||||||
<value><![CDATA[int32 err;
|
<value><![CDATA[int32 err;
|
||||||
uint32 tid1, tid2, tid3, tid4;
|
uint32 tid1, tid2, tid3, tid4;
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid1,
|
err = OS_TaskCreate(&tid1,
|
||||||
"running thread 1",
|
"running thread 1",
|
||||||
test_thread1,
|
test_thread1,
|
||||||
(uint32 *)wa_test1,
|
(uint32 *)wa_test1,
|
||||||
sizeof wa_test1,
|
sizeof wa_test1,
|
||||||
TASKS_BASE_PRIORITY - 3,
|
TASKS_BASE_PRIORITY - 3,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 1 creation failed");
|
test_assert(err == OS_SUCCESS, "task 1 creation failed");
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid2,
|
err = OS_TaskCreate(&tid2,
|
||||||
"running thread 2",
|
"running thread 2",
|
||||||
test_thread2,
|
test_thread2,
|
||||||
(uint32 *)wa_test2,
|
(uint32 *)wa_test2,
|
||||||
sizeof wa_test2,
|
sizeof wa_test2,
|
||||||
TASKS_BASE_PRIORITY - 2,
|
TASKS_BASE_PRIORITY - 2,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 2 creation failed");
|
test_assert(err == OS_SUCCESS, "task 2 creation failed");
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid3,
|
err = OS_TaskCreate(&tid3,
|
||||||
"running thread 3",
|
"running thread 3",
|
||||||
test_thread3,
|
test_thread3,
|
||||||
(uint32 *)wa_test3,
|
(uint32 *)wa_test3,
|
||||||
sizeof wa_test3,
|
sizeof wa_test3,
|
||||||
TASKS_BASE_PRIORITY - 1,
|
TASKS_BASE_PRIORITY - 1,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 3 creation failed");
|
test_assert(err == OS_SUCCESS, "task 3 creation failed");
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid4,
|
err = OS_TaskCreate(&tid4,
|
||||||
"running thread 4",
|
"running thread 4",
|
||||||
test_thread4,
|
test_thread4,
|
||||||
(uint32 *)wa_test4,
|
(uint32 *)wa_test4,
|
||||||
sizeof wa_test4,
|
sizeof wa_test4,
|
||||||
TASKS_BASE_PRIORITY - 0,
|
TASKS_BASE_PRIORITY - 0,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 4 creation failed");]]></value>
|
test_assert(err == OS_SUCCESS, "task 4 creation failed");]]></value>
|
||||||
</code>
|
</code>
|
||||||
</step>
|
</step>
|
||||||
|
@ -424,7 +424,7 @@ test_assert(err == OS_SUCCESS, "task 4 creation failed");]]></value>
|
||||||
<value />
|
<value />
|
||||||
</tags>
|
</tags>
|
||||||
<code>
|
<code>
|
||||||
<value><![CDATA[OS_TaskDelay(5);
|
<value><![CDATA[OS_TaskDelay(5);
|
||||||
test_assert_sequence("ABCD", "task order violation");]]></value>
|
test_assert_sequence("ABCD", "task order violation");]]></value>
|
||||||
</code>
|
</code>
|
||||||
</step>
|
</step>
|
||||||
|
@ -436,43 +436,43 @@ test_assert_sequence("ABCD", "task order violation");]]></value>
|
||||||
<value />
|
<value />
|
||||||
</tags>
|
</tags>
|
||||||
<code>
|
<code>
|
||||||
<value><![CDATA[int32 err;
|
<value><![CDATA[int32 err;
|
||||||
uint32 tid1, tid2, tid3, tid4;
|
uint32 tid1, tid2, tid3, tid4;
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid2,
|
err = OS_TaskCreate(&tid2,
|
||||||
"running thread 2",
|
"running thread 2",
|
||||||
test_thread2,
|
test_thread2,
|
||||||
(uint32 *)wa_test2,
|
(uint32 *)wa_test2,
|
||||||
sizeof wa_test2,
|
sizeof wa_test2,
|
||||||
TASKS_BASE_PRIORITY - 2,
|
TASKS_BASE_PRIORITY - 2,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 2 creation failed");
|
test_assert(err == OS_SUCCESS, "task 2 creation failed");
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid1,
|
err = OS_TaskCreate(&tid1,
|
||||||
"running thread 1",
|
"running thread 1",
|
||||||
test_thread1,
|
test_thread1,
|
||||||
(uint32 *)wa_test1,
|
(uint32 *)wa_test1,
|
||||||
sizeof wa_test1,
|
sizeof wa_test1,
|
||||||
TASKS_BASE_PRIORITY - 3,
|
TASKS_BASE_PRIORITY - 3,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 1 creation failed");
|
test_assert(err == OS_SUCCESS, "task 1 creation failed");
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid4,
|
err = OS_TaskCreate(&tid4,
|
||||||
"running thread 4",
|
"running thread 4",
|
||||||
test_thread4,
|
test_thread4,
|
||||||
(uint32 *)wa_test4,
|
(uint32 *)wa_test4,
|
||||||
sizeof wa_test4,
|
sizeof wa_test4,
|
||||||
TASKS_BASE_PRIORITY - 0,
|
TASKS_BASE_PRIORITY - 0,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 4 creation failed");
|
test_assert(err == OS_SUCCESS, "task 4 creation failed");
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid3,
|
err = OS_TaskCreate(&tid3,
|
||||||
"running thread 3",
|
"running thread 3",
|
||||||
test_thread3,
|
test_thread3,
|
||||||
(uint32 *)wa_test3,
|
(uint32 *)wa_test3,
|
||||||
sizeof wa_test3,
|
sizeof wa_test3,
|
||||||
TASKS_BASE_PRIORITY - 1,
|
TASKS_BASE_PRIORITY - 1,
|
||||||
0);
|
0);
|
||||||
test_assert(err == OS_SUCCESS, "task 3 creation failed");]]></value>
|
test_assert(err == OS_SUCCESS, "task 3 creation failed");]]></value>
|
||||||
</code>
|
</code>
|
||||||
</step>
|
</step>
|
||||||
|
@ -484,7 +484,7 @@ test_assert(err == OS_SUCCESS, "task 3 creation failed");]]></value>
|
||||||
<value />
|
<value />
|
||||||
</tags>
|
</tags>
|
||||||
<code>
|
<code>
|
||||||
<value><![CDATA[OS_TaskDelay(5);
|
<value><![CDATA[OS_TaskDelay(5);
|
||||||
test_assert_sequence("ABCD", "task order violation");]]></value>
|
test_assert_sequence("ABCD", "task order violation");]]></value>
|
||||||
</code>
|
</code>
|
||||||
</step>
|
</step>
|
||||||
|
|
|
@ -232,7 +232,7 @@ static void test_001_001_execute(void) {
|
||||||
test_assert(err == OS_ERR_NAME_TAKEN, "name conflict not detected");
|
test_assert(err == OS_ERR_NAME_TAKEN, "name conflict not detected");
|
||||||
|
|
||||||
err = OS_TaskCreate(&tid,
|
err = OS_TaskCreate(&tid,
|
||||||
"another running thread",
|
"conflicting thread",
|
||||||
test_thread1,
|
test_thread1,
|
||||||
(uint32 *)wa_test1,
|
(uint32 *)wa_test1,
|
||||||
sizeof wa_test1,
|
sizeof wa_test1,
|
||||||
|
|
Loading…
Reference in New Issue