[rtems-central commit] spec: Improve thread pinning test case
Sebastian Huber
sebh at rtems.org
Mon Sep 6 14:20:29 UTC 2021
Module: rtems-central
Branch: master
Commit: 9797da6b10245c4430c39de238ab0911146a7e47
Changeset: http://git.rtems.org/rtems-central/commit/?id=9797da6b10245c4430c39de238ab0911146a7e47
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Sep 6 16:00:56 2021 +0200
spec: Improve thread pinning test case
---
spec/score/thread/val/smp.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/spec/score/thread/val/smp.yml b/spec/score/thread/val/smp.yml
index 61ad017..c88ef77 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 );
More information about the vc
mailing list