From cf204e72ea5fd6e4be8b3295cb148fde5fdd47d2 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 16 Feb 2016 10:07:00 +0000 Subject: Tree reorganization. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8900 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/rt/testthd.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'test/rt/testthd.c') 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 } -- cgit v1.2.3