aboutsummaryrefslogtreecommitdiffstats
path: root/test/rt/testthd.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-02-16 10:07:00 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-02-16 10:07:00 +0000
commitcf204e72ea5fd6e4be8b3295cb148fde5fdd47d2 (patch)
tree5aae4b9a6c78c8f14c2a6ca8cd6446f42b3b29bd /test/rt/testthd.c
parent641f2c372605cf405f0dda8536b45a78e0e5e2e2 (diff)
downloadChibiOS-cf204e72ea5fd6e4be8b3295cb148fde5fdd47d2.tar.gz
ChibiOS-cf204e72ea5fd6e4be8b3295cb148fde5fdd47d2.tar.bz2
ChibiOS-cf204e72ea5fd6e4be8b3295cb148fde5fdd47d2.zip
Tree reorganization.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8900 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test/rt/testthd.c')
-rw-r--r--test/rt/testthd.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/test/rt/testthd.c b/test/rt/testthd.c
index 5b1127aa3..e7e8ddb38 100644
--- a/test/rt/testthd.c
+++ b/test/rt/testthd.c
@@ -96,11 +96,7 @@ static void thd2_execute(void) {
threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriorityX()-5, thread, "E");
threads[4] = chThdCreateStatic(wa[4], WA_SIZE, chThdGetPriorityX()-1, thread, "A");
threads[3] = chThdCreateStatic(wa[3], WA_SIZE, chThdGetPriorityX()-2, thread, "B");
- /* Done this way for coverage of chThdCreateI() and chThdStart().*/
- chSysLock();
- threads[2] = chThdCreateI(wa[2], WA_SIZE, chThdGetPriorityX()-3, thread, "C");
- chSysUnlock();
- chThdStart(threads[2]);
+ threads[2] = chThdCreateStatic(wa[2], WA_SIZE, chThdGetPriorityX()-3, thread, "C");
test_wait_threads();
test_assert_sequence(1, "ABCDE");
}
@@ -140,7 +136,7 @@ static void thd3_execute(void) {
#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__)
/* Simulates a priority boost situation (p_prio > p_realprio).*/
chSysLock();
- chThdGetSelfX()->p_prio += 2;
+ chThdGetSelfX()->prio += 2;
chSysUnlock();
test_assert(5, chThdGetPriorityX() == prio + 2,
"unexpected priority level");
@@ -149,23 +145,23 @@ static void thd3_execute(void) {
p1 = chThdSetPriority(prio + 1);
test_assert(6, p1 == prio,
"unexpected returned priority level");
- test_assert(7, chThdGetSelfX()->p_prio == prio + 2,
+ test_assert(7, chThdGetSelfX()->prio == prio + 2,
"unexpected priority level");
- test_assert(8, chThdGetSelfX()->p_realprio == prio + 1,
+ test_assert(8, chThdGetSelfX()->realprio == prio + 1,
"unexpected returned real priority level");
/* Tries to raise above the boost level. */
p1 = chThdSetPriority(prio + 3);
test_assert(9, p1 == prio + 1,
"unexpected returned priority level");
- test_assert(10, chThdGetSelfX()->p_prio == prio + 3,
+ test_assert(10, chThdGetSelfX()->prio == prio + 3,
"unexpected priority level");
- test_assert(11, chThdGetSelfX()->p_realprio == prio + 3,
+ test_assert(11, chThdGetSelfX()->realprio == prio + 3,
"unexpected real priority level");
chSysLock();
- chThdGetSelfX()->p_prio = prio;
- chThdGetSelfX()->p_realprio = prio;
+ chThdGetSelfX()->prio = prio;
+ chThdGetSelfX()->realprio = prio;
chSysUnlock();
#endif
}