diff --git a/test/testmtx.c b/test/testmtx.c index 149f47d11..83c6278b1 100644 --- a/test/testmtx.c +++ b/test/testmtx.c @@ -399,6 +399,7 @@ static void mtx4_execute(void) { test_assert(11, chThdGetPriority() == p2, "wrong priority level"); chSysLock(); chMtxUnlockS(); + chSchRescheduleS(); chSysUnlock(); test_assert(12, chThdGetPriority() == p1, "wrong priority level"); chThdSleepMilliseconds(100); diff --git a/test/testsem.c b/test/testsem.c index d4b990797..c97a3d35d 100644 --- a/test/testsem.c +++ b/test/testsem.c @@ -102,6 +102,7 @@ static void sem1_execute(void) { threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+5, thread1, "A"); chSysLock(); chSemAddCounterI(&sem1, 2); + chSchRescheduleS(); chSysUnlock(); test_wait_threads(); test_assert(2, chSemGetCounterI(&sem1) == 1, "invalid counter");