[Xenomai-git] Philippe Gerum : testsuite/latency: fix false positive in mode switch detection
Module: xenomai-rpm Branch: for-upstream Commit: 466d810ac9b61b06eaa9cb28815d95f063084fb8 URL: http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=466d810ac9b61b06eaa9cb28815d95f063084fb8 Author: Philippe Gerum r...@xenomai.org Date: Wed Mar 10 11:44:34 2010 +0100 testsuite/latency: fix false positive in mode switch detection When ^C is depressed to stop the test, receiving SIGINT on the sampling task must have caused a mode switch notification earlier. This is a false positive wrt involuntary mode switch reporting, ignore it. Masking SIGINT for the sampling task would require an initial mode switch we might not want to perform either. --- src/testsuite/latency/latency.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/src/testsuite/latency/latency.c b/src/testsuite/latency/latency.c index 4df8e7f..08f9c19 100644 --- a/src/testsuite/latency/latency.c +++ b/src/testsuite/latency/latency.c @@ -437,6 +437,21 @@ void cleanup(void) void sighand(int sig __attribute__ ((unused))) { + RT_TASK *me; + + if (sig == SIGINT) { + /* +* Receiving SIGINT on the sampling task must have +* caused a mode switch notification earlier. This is +* a false positive wrt involuntary mode switch +* reporting, ignore it. +*/ + me = rt_task_self(); + if (me rt_task_same(me, latency_task) + sampling_relaxed 0) + sampling_relaxed--; + } + finished = 1; } ___ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : testsuite/latency: fix false positive in mode switch detection
Module: xenomai-rpm Branch: for-upstream Commit: 9be1830070b705c7a00139814ed50c385bd0c8e1 URL: http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=9be1830070b705c7a00139814ed50c385bd0c8e1 Author: Philippe Gerum r...@xenomai.org Date: Wed Mar 10 12:13:46 2010 +0100 testsuite/latency: fix false positive in mode switch detection When ^C is depressed to stop the test, receiving SIGINT on the sampling task must have caused a mode switch notification earlier. This is a false positive wrt involuntary mode switch reporting. To avoid this, block SIGINT (and most termination signals altogether) for test threads, and receive them explicitely on the main thread via sigwait(). --- src/testsuite/latency/latency.c | 27 --- 1 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/testsuite/latency/latency.c b/src/testsuite/latency/latency.c index 4df8e7f..e9e741e 100644 --- a/src/testsuite/latency/latency.c +++ b/src/testsuite/latency/latency.c @@ -435,11 +435,6 @@ void cleanup(void) exit(0); } -void sighand(int sig __attribute__ ((unused))) -{ - finished = 1; -} - void faulthand(int sig) { xntrace_user_freeze(0, 1); @@ -451,12 +446,11 @@ void mode_sw(int sig) { #ifndef __UCLIBC__ const char buffer[] = Mode switch, aborting. Backtrace:\n; + static void *bt[200]; #else /* __UCLIBC__ */ const char buffer[] = Mode switch, aborting. Backtrace unavailable with uclibc.\n; #endif /* __UCLIBC__ */ - - static void *bt[200]; unsigned n; if (!stop_upon_switch) { @@ -476,9 +470,9 @@ void mode_sw(int sig) int main(int argc, char **argv) { - int c, err; + int cpu = 0, c, err, sig; char task_name[16]; - int cpu = 0; + sigset_t mask; while ((c = getopt(argc, argv, hp:l:T:qH:B:sD:t:fc:P:b)) != EOF) switch (c) { @@ -600,10 +594,13 @@ int main(int argc, char **argv) else if (priority T_HIPRIO) priority = T_HIPRIO; - signal(SIGINT, sighand); - signal(SIGTERM, sighand); - signal(SIGHUP, sighand); - signal(SIGALRM, sighand); + sigemptyset(mask); + sigaddset(mask, SIGINT); + sigaddset(mask, SIGTERM); + sigaddset(mask, SIGHUP); + sigaddset(mask, SIGALRM); + pthread_sigmask(SIG_BLOCK, mask, NULL); + signal(SIGXCPU, mode_sw); if (freeze_max) { @@ -681,8 +678,8 @@ int main(int argc, char **argv) } } - while (!finished) - pause(); + sigwait(mask, sig); + finished = 1; cleanup(); ___ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : blackfin: upgrade I-pipe support to 2.6.33-blackfin-1. 13-00
Module: xenomai-rpm Branch: for-upstream Commit: a821ec7095e4d5c7807999c0016349b43d8de2a5 URL: http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=a821ec7095e4d5c7807999c0016349b43d8de2a5 Author: Philippe Gerum r...@xenomai.org Date: Wed Mar 10 16:27:58 2010 +0100 blackfin: upgrade I-pipe support to 2.6.33-blackfin-1.13-00 --- ksrc/arch/blackfin/patches/README | 58 +- .../adeos-ipipe-2.6.33-blackfin-1.13-00.patch | 7596 + .../adeos-ipipe-2008R1.5-RC3-bf5xx-1.8-00.patch| 8629 3 files changed, 7638 insertions(+), 8645 deletions(-) Diff: http://git.xenomai.org/?p=xenomai-rpm.git;a=commitdiff;h=a821ec7095e4d5c7807999c0016349b43d8de2a5 ___ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : powerpc: remove dandling reference
Module: xenomai-rpm Branch: for-upstream Commit: b4fe8557966956a9f5404edd4a656f8e5475797a URL: http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=b4fe8557966956a9f5404edd4a656f8e5475797a Author: Philippe Gerum r...@xenomai.org Date: Wed Mar 10 16:27:12 2010 +0100 powerpc: remove dandling reference --- ksrc/arch/powerpc/patches/README |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ksrc/arch/powerpc/patches/README b/ksrc/arch/powerpc/patches/README index 05de315..010a86e 100644 --- a/ksrc/arch/powerpc/patches/README +++ b/ksrc/arch/powerpc/patches/README @@ -4,10 +4,10 @@ Xenomai needs special kernel support to deliver fast and deterministic response time to external interrupts, and also to provide real-time services highly integrated with the standard Linux kernel. -This support is provided by the Adeos real-time enabler [1], in the -form of a kernel patch you have to apply against a vanilla kernel -tree, before you attempt to compile the Xenomai codebase against the -latter kernel. +This support is provided by the Adeos real-time enabler, in the form +of a kernel patch you have to apply against a vanilla kernel tree, +before you attempt to compile the Xenomai codebase against the latter +kernel. On the PowerPC 32bit architecture, Xenomai is supported on both the v2.4 and v2.6 Linux kernel series, for which the appropriate Adeos ___ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git