aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--readme.txt1
-rw-r--r--test/testmtx.c12
2 files changed, 8 insertions, 5 deletions
diff --git a/readme.txt b/readme.txt
index bc8150ecb..bfab5b5ea 100644
--- a/readme.txt
+++ b/readme.txt
@@ -81,6 +81,7 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
timing of test events.
- NEW: New API chSysInTimeWindow() that checks if the current system time is
within the specified time window.
+- FIX: Mutex test #1 in the test suite corrected, it failed to... fail.
- FIX: Fixed a problem in the STM32 port USART1 driver.
- Added the definitions for packed structures to the chtypes.h files.
- Fixed a problem in the MMC/SD driver in the LPC2148 demo.
diff --git a/test/testmtx.c b/test/testmtx.c
index 2f1aaa33f..526a64ffa 100644
--- a/test/testmtx.c
+++ b/test/testmtx.c
@@ -48,13 +48,15 @@ static msg_t thread1(void *p) {
static void mtx1_execute(void) {
+ tprio_t prio = chThdGetPriority(); // Bacause priority inheritance.
chMtxLock(&m1);
- threads[0] = chThdCreate(chThdGetPriority()+1, 0, wa[0], STKSIZE, thread1, "E");
- threads[1] = chThdCreate(chThdGetPriority()+2, 0, wa[1], STKSIZE, thread1, "D");
- threads[2] = chThdCreate(chThdGetPriority()+3, 0, wa[2], STKSIZE, thread1, "C");
- threads[3] = chThdCreate(chThdGetPriority()+4, 0, wa[3], STKSIZE, thread1, "B");
- threads[4] = chThdCreate(chThdGetPriority()+5, 0, wa[4], STKSIZE, thread1, "A");
+ threads[0] = chThdCreate(prio+1, 0, wa[0], STKSIZE, thread1, "E");
+ threads[1] = chThdCreate(prio+2, 0, wa[1], STKSIZE, thread1, "D");
+ threads[2] = chThdCreate(prio+3, 0, wa[2], STKSIZE, thread1, "C");
+ threads[3] = chThdCreate(prio+4, 0, wa[3], STKSIZE, thread1, "B");
+ threads[4] = chThdCreate(prio+5, 0, wa[4], STKSIZE, thread1, "A");
chMtxUnlock();
+ test_assert(prio == chThdGetPriority(), "priority return failure");
test_wait_threads();
test_assert_sequence("ABCDE");
}