aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-12-28 10:07:46 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-12-28 10:07:46 +0000
commit3e9765e2069a9faedff2721a1abf46607cf1189d (patch)
tree12de2adbe2b6107499ce604d50578ff717667fd8 /test
parentdd39b808aceeb2cc726c9b90fe9ca3116bf0ebd7 (diff)
downloadChibiOS-3e9765e2069a9faedff2721a1abf46607cf1189d.tar.gz
ChibiOS-3e9765e2069a9faedff2721a1abf46607cf1189d.tar.bz2
ChibiOS-3e9765e2069a9faedff2721a1abf46607cf1189d.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@545 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r--test/testbmk.c28
-rw-r--r--test/testcond.c20
2 files changed, 24 insertions, 24 deletions
diff --git a/test/testbmk.c b/test/testbmk.c
index 19775a2d3..3fe32df00 100644
--- a/test/testbmk.c
+++ b/test/testbmk.c
@@ -59,7 +59,7 @@ static char *bmk1_gettest(void) {
static void bmk1_execute(void) {
uint32_t n;
- threads[0] = chThdCreateFast(chThdGetPriority()-1, wa[0], WA_SIZE, thread1);
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()-1, thread1, NULL);
n = msg_loop_test(threads[0]);
chThdTerminate(threads[0]);
test_wait_threads();
@@ -85,7 +85,7 @@ static char *bmk2_gettest(void) {
static void bmk2_execute(void) {
uint32_t n;
- threads[0] = chThdCreateFast(chThdGetPriority()+1, wa[0], WA_SIZE, thread1);
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+1, thread1, NULL);
n = msg_loop_test(threads[0]);
chThdTerminate(threads[0]);
test_wait_threads();
@@ -116,11 +116,11 @@ static char *bmk3_gettest(void) {
static void bmk3_execute(void) {
uint32_t n;
- threads[0] = chThdCreateFast(chThdGetPriority()+1, wa[0], WA_SIZE, thread1);
- threads[1] = chThdCreateFast(chThdGetPriority()-2, wa[1], WA_SIZE, thread2);
- threads[2] = chThdCreateFast(chThdGetPriority()-3, wa[2], WA_SIZE, thread2);
- threads[3] = chThdCreateFast(chThdGetPriority()-4, wa[3], WA_SIZE, thread2);
- threads[4] = chThdCreateFast(chThdGetPriority()-5, wa[4], WA_SIZE, thread2);
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+1, thread1, NULL);
+ threads[1] = chThdCreateStatic(wa[1], WA_SIZE, chThdGetPriority()-2, thread2, NULL);
+ threads[2] = chThdCreateStatic(wa[2], WA_SIZE, chThdGetPriority()-3, thread2, NULL);
+ threads[3] = chThdCreateStatic(wa[3], WA_SIZE, chThdGetPriority()-4, thread2, NULL);
+ threads[4] = chThdCreateStatic(wa[4], WA_SIZE, chThdGetPriority()-5, thread2, NULL);
n = msg_loop_test(threads[0]);
chThdTerminate(threads[0]);
test_wait_threads();
@@ -151,7 +151,7 @@ static void bmk4_execute(void) {
test_wait_tick();
test_start_timer(1000);
do {
- chThdWait(chThdCreateFast(prio, wap, WA_SIZE, thread2));
+ chThdWait(chThdCreateStatic(wap, WA_SIZE, prio, thread2, NULL));
n++;
#if defined(WIN32)
ChkIntSources();
@@ -182,7 +182,7 @@ static void bmk5_execute(void) {
test_wait_tick();
test_start_timer(1000);
do {
- chThdCreateFast(prio, wap, WA_SIZE, thread2);
+ chThdCreateStatic(wap, WA_SIZE, prio, thread2, NULL);
n++;
#if defined(WIN32)
ChkIntSources();
@@ -220,11 +220,11 @@ static void bmk6_setup(void) {
static void bmk6_execute(void) {
uint32_t n;
- threads[0] = chThdCreateFast(chThdGetPriority()+1, wa[0], WA_SIZE, thread3);
- threads[1] = chThdCreateFast(chThdGetPriority()+2, wa[1], WA_SIZE, thread3);
- threads[2] = chThdCreateFast(chThdGetPriority()+3, wa[2], WA_SIZE, thread3);
- threads[3] = chThdCreateFast(chThdGetPriority()+4, wa[3], WA_SIZE, thread3);
- threads[4] = chThdCreateFast(chThdGetPriority()+5, wa[4], WA_SIZE, thread3);
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+1, thread3, NULL);
+ threads[1] = chThdCreateStatic(wa[1], WA_SIZE, chThdGetPriority()+2, thread3, NULL);
+ threads[2] = chThdCreateStatic(wa[2], WA_SIZE, chThdGetPriority()+3, thread3, NULL);
+ threads[3] = chThdCreateStatic(wa[3], WA_SIZE, chThdGetPriority()+4, thread3, NULL);
+ threads[4] = chThdCreateStatic(wa[4], WA_SIZE, chThdGetPriority()+5, thread3, NULL);
n = 0;
test_wait_tick();
diff --git a/test/testcond.c b/test/testcond.c
index e202a0d15..cbc304270 100644
--- a/test/testcond.c
+++ b/test/testcond.c
@@ -53,11 +53,11 @@ static void cond1_execute(void) {
// Bacause priority inheritance.
tprio_t prio = chThdGetPriority();
- threads[0] = chThdCreate(prio+1, 0, wa[0], WA_SIZE, thread1, "E");
- threads[1] = chThdCreate(prio+2, 0, wa[1], WA_SIZE, thread1, "D");
- threads[2] = chThdCreate(prio+3, 0, wa[2], WA_SIZE, thread1, "C");
- threads[3] = chThdCreate(prio+4, 0, wa[3], WA_SIZE, thread1, "B");
- threads[4] = chThdCreate(prio+5, 0, wa[4], WA_SIZE, thread1, "A");
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, prio+1, thread1, "E");
+ threads[1] = chThdCreateStatic(wa[1], WA_SIZE, prio+2, thread1, "D");
+ threads[2] = chThdCreateStatic(wa[2], WA_SIZE, prio+3, thread1, "C");
+ threads[3] = chThdCreateStatic(wa[3], WA_SIZE, prio+4, thread1, "B");
+ threads[4] = chThdCreateStatic(wa[4], WA_SIZE, prio+5, thread1, "A");
test_assert(prio == chThdGetPriority(), "priority return failure");
chCondSignal(&c1);
chCondSignal(&c1);
@@ -84,11 +84,11 @@ static void cond2_execute(void) {
// Bacause priority inheritance.
tprio_t prio = chThdGetPriority();
- threads[0] = chThdCreate(prio+1, 0, wa[0], WA_SIZE, thread1, "E");
- threads[1] = chThdCreate(prio+2, 0, wa[1], WA_SIZE, thread1, "D");
- threads[2] = chThdCreate(prio+3, 0, wa[2], WA_SIZE, thread1, "C");
- threads[3] = chThdCreate(prio+4, 0, wa[3], WA_SIZE, thread1, "B");
- threads[4] = chThdCreate(prio+5, 0, wa[4], WA_SIZE, thread1, "A");
+ threads[0] = chThdCreateStatic(wa[0], WA_SIZE, prio+1, thread1, "E");
+ threads[1] = chThdCreateStatic(wa[1], WA_SIZE, prio+2, thread1, "D");
+ threads[2] = chThdCreateStatic(wa[2], WA_SIZE, prio+3, thread1, "C");
+ threads[3] = chThdCreateStatic(wa[3], WA_SIZE, prio+4, thread1, "B");
+ threads[4] = chThdCreateStatic(wa[4], WA_SIZE, prio+5, thread1, "A");
test_assert(prio == chThdGetPriority(), "priority return failure");
chCondBroadcast(&c1);
test_wait_threads();