aboutsummaryrefslogtreecommitdiffstats
path: root/test/testthd.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/testthd.c')
-rw-r--r--test/testthd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/testthd.c b/test/testthd.c
index b12378320..8b0440248 100644
--- a/test/testthd.c
+++ b/test/testthd.c
@@ -100,7 +100,11 @@ static void thd2_execute(void) {
threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()-5, thread, "E");
threads[4] = chThdCreateStatic(wa[4], WA_SIZE, chThdGetPriority()-1, thread, "A");
threads[3] = chThdCreateStatic(wa[3], WA_SIZE, chThdGetPriority()-2, thread, "B");
- threads[2] = chThdCreateStatic(wa[2], WA_SIZE, chThdGetPriority()-3, thread, "C");
+ /* Done this way for coverage of chThdCreateI() and chThdResume().*/
+ chSysLock();
+ threads[2] = chThdCreateI(wa[2], WA_SIZE, chThdGetPriority()-3, thread, "C");
+ chSysUnlock();
+ chThdResume(threads[2]);
test_wait_threads();
test_assert_sequence(1, "ABCDE");
}