summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-06 16:00:56 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-06 16:01:43 +0200
commit9797da6b10245c4430c39de238ab0911146a7e47 (patch)
tree77e65c27493310f69462f21b510f78ada7aed172
parentspec: Specifiy timer fire order (diff)
downloadrtems-central-9797da6b10245c4430c39de238ab0911146a7e47.tar.bz2
spec: Improve thread pinning test case
-rw-r--r--spec/score/thread/val/smp.yml5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/score/thread/val/smp.yml b/spec/score/thread/val/smp.yml
index 61ad017e..c88ef776 100644
--- a/spec/score/thread/val/smp.yml
+++ b/spec/score/thread/val/smp.yml
@@ -94,6 +94,11 @@ test-actions:
code: |
_Thread_Pin( executing );
+ /* We have to preempt the runner to end up in _Thread_Do_unpin() */
+ SetPriority( ctx->worker_c_id, PRIO_HIGH );
+ SendEvents( ctx->worker_c_id, EVENT_COUNT );
+ T_eq_u32( ctx->counter, 2 );
+
cpu_self = _Thread_Dispatch_disable();
CallWithinISR( Suspend, executing );
_Thread_Unpin( executing, cpu_self );