1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/mutex_order
Gerson Fernando Budke 4a9f0efb6d boards: introduce atmega328p-xplained-mini
Add ATmega328P Xplained Mini board.  The board is an official
development kit from MCHP based on the Arduino UNO, reduced
hardware, with a xplainedmini debugger and CDC ACM serial
converter.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-27 14:10:19 -03:00
..
tests tests/mutex_order: refactor the test to avoid knowing the thread IDs 2020-06-09 22:54:27 +02:00
main.c tests: Cleanup access to internal variables 2020-08-24 09:08:01 +02:00
Makefile tests: BOARD_INSUFFICIENT_MEMORY -> Makefile.ci 2019-10-17 15:11:59 +02:00
Makefile.ci boards: introduce atmega328p-xplained-mini 2021-03-27 14:10:19 -03:00
README.md tests: mutex_order: fixed and updated README 2016-11-03 16:37:39 +01:00

Expected result

When successful, you should see 5 different threads printing their PID and priority. The thread with the lowest priority should be able to lock (and unlock) the mutex first, followed by the other threads in the order of their priority (highest next). The output should look like the following:

main(): This is RIOT! (Version: xxx)
Mutex order test
Please refer to the README.md for more information

T3 (prio 6): trying to lock mutex now
T4 (prio 4): trying to lock mutex now
T5 (prio 0): trying to lock mutex now
T6 (prio 2): trying to lock mutex now
T7 (prio 1): trying to lock mutex now
T5 (prio 0): unlocking mutex now
T7 (prio 1): unlocking mutex now
T6 (prio 2): unlocking mutex now
T4 (prio 4): unlocking mutex now
T3 (prio 6): unlocking mutex now

Test END, check the order of priorities above.

Background

This test application stresses a mutex with a number of threads waiting on it.