Module: xenomai-3 Branch: next Commit: b32d11169db844a7770a599b73d66145af069e2f URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=b32d11169db844a7770a599b73d66145af069e2f
Author: Philippe Gerum <[email protected]> Date: Mon Oct 27 08:57:27 2014 +0100 smokey/sched-tp: force affinity on the test CPU --- testsuite/smokey/sched-tp/sched-tp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/testsuite/smokey/sched-tp/sched-tp.c b/testsuite/smokey/sched-tp/sched-tp.c index ee6a07f..b946c85 100644 --- a/testsuite/smokey/sched-tp/sched-tp.c +++ b/testsuite/smokey/sched-tp/sched-tp.c @@ -37,8 +37,15 @@ static void *thread_body(void *arg) pthread_t me = pthread_self(); struct sched_param_ex param; struct timespec ts; + cpu_set_t affinity; int ret, part; + CPU_ZERO(&affinity); + CPU_SET(0, &affinity); + ret = sched_setaffinity(0, sizeof(affinity), &affinity); + if (ret) + error(1, errno, "sched_setaffinity"); + part = (int)(long)arg; param.sched_priority = 50 - part; param.sched_tp_partition = part; _______________________________________________ Xenomai-git mailing list [email protected] http://www.xenomai.org/mailman/listinfo/xenomai-git
