t4-l2-pi-deboost.tst 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #
  2. # rt-mutex test
  3. #
  4. # Op: C(ommand)/T(est)/W(ait)
  5. # | opcode
  6. # | | threadid: 0-7
  7. # | | | opcode argument
  8. # | | | |
  9. # C: lock: 0: 0
  10. #
  11. # Commands
  12. #
  13. # opcode opcode argument
  14. # schedother nice value
  15. # schedfifo priority
  16. # lock lock nr (0-7)
  17. # locknowait lock nr (0-7)
  18. # lockint lock nr (0-7)
  19. # lockintnowait lock nr (0-7)
  20. # lockcont lock nr (0-7)
  21. # unlock lock nr (0-7)
  22. # signal thread to signal (0-7)
  23. # reset 0
  24. # resetevent 0
  25. #
  26. # Tests / Wait
  27. #
  28. # opcode opcode argument
  29. #
  30. # prioeq priority
  31. # priolt priority
  32. # priogt priority
  33. # nprioeq normal priority
  34. # npriolt normal priority
  35. # npriogt normal priority
  36. # locked lock nr (0-7)
  37. # blocked lock nr (0-7)
  38. # blockedwake lock nr (0-7)
  39. # unlocked lock nr (0-7)
  40. # opcodeeq command opcode or number
  41. # opcodelt number
  42. # opcodegt number
  43. # eventeq number
  44. # eventgt number
  45. # eventlt number
  46. #
  47. # 4 threads 2 lock PI
  48. #
  49. C: resetevent: 0: 0
  50. W: opcodeeq: 0: 0
  51. # Set schedulers
  52. C: schedother: 0: 0
  53. C: schedother: 1: 0
  54. C: schedfifo: 2: 82
  55. C: schedfifo: 3: 83
  56. # T0 lock L0
  57. C: locknowait: 0: 0
  58. W: locked: 0: 0
  59. # T1 lock L1
  60. C: locknowait: 1: 1
  61. W: locked: 1: 1
  62. # T3 lock L0
  63. C: lockintnowait: 3: 0
  64. W: blocked: 3: 0
  65. T: prioeq: 0: 83
  66. # T0 lock L1
  67. C: lock: 0: 1
  68. W: blocked: 0: 1
  69. T: prioeq: 1: 83
  70. # T1 unlock L1
  71. C: unlock: 1: 1
  72. # Wait until T0 is in the wakeup code
  73. W: blockedwake: 0: 1
  74. # Verify that T1 is unboosted
  75. W: unlocked: 1: 1
  76. T: priolt: 1: 1
  77. # T2 lock L1 (T0 is boosted and pending owner !)
  78. C: locknowait: 2: 1
  79. W: blocked: 2: 1
  80. T: prioeq: 0: 83
  81. # Interrupt T3 and wait until T3 returned
  82. C: signal: 3: 0
  83. W: unlocked: 3: 0
  84. # Verify prio of T0 (still pending owner,
  85. # but T2 is enqueued due to the previous boost by T3
  86. T: prioeq: 0: 82
  87. # Let T0 continue
  88. C: lockcont: 0: 1
  89. W: locked: 0: 1
  90. # Unlock L1 and let T2 get L1
  91. C: unlock: 0: 1
  92. W: locked: 2: 1
  93. # Verify that T0 is unboosted
  94. W: unlocked: 0: 1
  95. T: priolt: 0: 1
  96. # Unlock everything and exit
  97. C: unlock: 2: 1
  98. W: unlocked: 2: 1
  99. C: unlock: 0: 0
  100. W: unlocked: 0: 0