aboutsummaryrefslogtreecommitdiffstats
path: root/test/testsem.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/testsem.c')
-rw-r--r--test/testsem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/testsem.c b/test/testsem.c
index 6a6a622ef..d5c9072a7 100644
--- a/test/testsem.c
+++ b/test/testsem.c
@@ -104,7 +104,9 @@ static void sem1_execute(void) {
test_assert_sequence(1, "ABCDE");
#endif
threads[0] = chThdCreateStatic(wa[0], WA_SIZE, chThdGetPriority()+5, thread1, "A");
+ chSysLock();
chSemAddCounterI(&sem1, 2);
+ chSysUnlock();
test_wait_threads();
test_assert(2, chSemGetCounterI(&sem1) == 1, "invalid counter");
}