[Xenomai-git] Philippe Gerum : smokey/sched-quota: force affinity on the test CPU

2014-10-30 Thread git repository hosting
Module: xenomai-3
Branch: master
Commit: a0d78580975974b94795e3a29b0a1704d7b7f785
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=a0d78580975974b94795e3a29b0a1704d7b7f785

Author: Philippe Gerum r...@xenomai.org
Date:   Mon Oct 27 08:58:15 2014 +0100

smokey/sched-quota: force affinity on the test CPU

---

 testsuite/smokey/sched-quota/sched-quota.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/testsuite/smokey/sched-quota/sched-quota.c 
b/testsuite/smokey/sched-quota/sched-quota.c
index e8f4347..da1c471 100644
--- a/testsuite/smokey/sched-quota/sched-quota.c
+++ b/testsuite/smokey/sched-quota/sched-quota.c
@@ -270,8 +270,15 @@ static int run_sched_quota(struct smokey_test *t, int 
argc, char *const argv[])
pthread_t me = pthread_self();
struct sched_param param;
int ret, quota = 0;
+   cpu_set_t affinity;
double effective;
 
+   CPU_ZERO(affinity);
+   CPU_SET(0, affinity);
+   ret = sched_setaffinity(0, sizeof(affinity), affinity);
+   if (ret)
+   error(1, errno, sched_setaffinity);
+
smokey_parse_args(t, argc, argv);
pthread_mutex_init(lock, NULL);
pthread_cond_init(barrier, NULL);


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Philippe Gerum : smokey/sched-quota: force affinity on the test CPU

2014-10-27 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: a0d78580975974b94795e3a29b0a1704d7b7f785
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=a0d78580975974b94795e3a29b0a1704d7b7f785

Author: Philippe Gerum r...@xenomai.org
Date:   Mon Oct 27 08:58:15 2014 +0100

smokey/sched-quota: force affinity on the test CPU

---

 testsuite/smokey/sched-quota/sched-quota.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/testsuite/smokey/sched-quota/sched-quota.c 
b/testsuite/smokey/sched-quota/sched-quota.c
index e8f4347..da1c471 100644
--- a/testsuite/smokey/sched-quota/sched-quota.c
+++ b/testsuite/smokey/sched-quota/sched-quota.c
@@ -270,8 +270,15 @@ static int run_sched_quota(struct smokey_test *t, int 
argc, char *const argv[])
pthread_t me = pthread_self();
struct sched_param param;
int ret, quota = 0;
+   cpu_set_t affinity;
double effective;
 
+   CPU_ZERO(affinity);
+   CPU_SET(0, affinity);
+   ret = sched_setaffinity(0, sizeof(affinity), affinity);
+   if (ret)
+   error(1, errno, sched_setaffinity);
+
smokey_parse_args(t, argc, argv);
pthread_mutex_init(lock, NULL);
pthread_cond_init(barrier, NULL);


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git