[Xenomai-git] Jan Kiszka : xeno-test: Use new -E switch of clocktest
Module: xenomai-jki Branch: for-forge Commit: a75420cb889e3512ec2830ed0f92cd00028d6462 URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=a75420cb889e3512ec2830ed0f92cd00028d6462 Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Nov 8 19:24:37 2013 +0100 xeno-test: Use new -E switch of clocktest Just to make sure it's used in our own testsuite. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- testsuite/xeno-test/xeno-test.in |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/xeno-test/xeno-test.in b/testsuite/xeno-test/xeno-test.in index ea3c042..9b00b55 100644 --- a/testsuite/xeno-test/xeno-test.in +++ b/testsuite/xeno-test/xeno-test.in @@ -45,7 +45,7 @@ echo 0 /proc/xenomai/latency || : testdir=@testdir@ $testdir/arith -$testdir/clocktest -D -T 30 -C 65578 || $testdir/clocktest -T 30 +$testdir/clocktest -D -T 30 -E -C 42 || $testdir/clocktest -T 30 $testdir/switchtest -T 30 $testdir/cond-torture # $testdir/mutex-torture ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : cobalt/kernel: Provide uninterruptible xnthread_join for RTDM use cases
Module: xenomai-jki Branch: for-forge Commit: 4b6848fede36df76c24ac6cf738f7b52c1a495f5 URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=4b6848fede36df76c24ac6cf738f7b52c1a495f5 Author: Jan Kiszka jan.kis...@siemens.com Date: Wed Nov 20 19:49:38 2013 +0100 cobalt/kernel: Provide uninterruptible xnthread_join for RTDM use cases The semantics of rtdm_task_destroy and rtdm_task_join mandate that the specified task is truly history by the time these functions return. And that has to include the case that the caller has a Linux signal pending. Thus, we need a variant of xnthread_join that waits unconditionally for thread termination. This fixes rare crashes when terminating switchtest early. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- include/cobalt/kernel/rtdm/driver.h |2 +- include/cobalt/kernel/thread.h |2 +- kernel/cobalt/posix/thread.c|2 +- kernel/cobalt/rtdm/drvlib.c |2 +- kernel/cobalt/thread.c |7 +-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/cobalt/kernel/rtdm/driver.h b/include/cobalt/kernel/rtdm/driver.h index 0f690d6..3e1795c 100644 --- a/include/cobalt/kernel/rtdm/driver.h +++ b/include/cobalt/kernel/rtdm/driver.h @@ -1088,7 +1088,7 @@ void rtdm_task_busy_sleep(nanosecs_rel_t delay); static inline void rtdm_task_destroy(rtdm_task_t *task) { xnthread_cancel(task); - xnthread_join(task); + xnthread_join(task, true); } static inline int rtdm_task_should_stop(void) diff --git a/include/cobalt/kernel/thread.h b/include/cobalt/kernel/thread.h index 5c5e391..76c4ca1 100644 --- a/include/cobalt/kernel/thread.h +++ b/include/cobalt/kernel/thread.h @@ -421,7 +421,7 @@ int xnthread_set_slice(struct xnthread *thread, void xnthread_cancel(struct xnthread *thread); -int xnthread_join(struct xnthread *thread); +int xnthread_join(struct xnthread *thread, bool uninterruptible); #ifdef CONFIG_SMP int xnthread_migrate(int cpu); diff --git a/kernel/cobalt/posix/thread.c b/kernel/cobalt/posix/thread.c index f8b0e3b..0691bde 100644 --- a/kernel/cobalt/posix/thread.c +++ b/kernel/cobalt/posix/thread.c @@ -1120,7 +1120,7 @@ int cobalt_thread_join(unsigned long pth) if (thread == NULL) return -ESRCH; - return xnthread_join(thread-threadbase); + return xnthread_join(thread-threadbase, false); } int cobalt_thread_stat(pid_t pid, diff --git a/kernel/cobalt/rtdm/drvlib.c b/kernel/cobalt/rtdm/drvlib.c index c4e2e83..17178ee 100644 --- a/kernel/cobalt/rtdm/drvlib.c +++ b/kernel/cobalt/rtdm/drvlib.c @@ -445,7 +445,7 @@ void rtdm_task_join_nrt(rtdm_task_t *task, unsigned int poll_delay) trace_mark(xn_rtdm, task_joinnrt, thread %p poll_delay %u, task, poll_delay); - xnthread_join(task); + xnthread_join(task, true); } EXPORT_SYMBOL_GPL(rtdm_task_join_nrt); diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c index 0b61380..9bf2506 100644 --- a/kernel/cobalt/thread.c +++ b/kernel/cobalt/thread.c @@ -1508,7 +1508,7 @@ EXPORT_SYMBOL_GPL(xnthread_cancel); * * @remark Tags: might-switch. */ -int xnthread_join(struct xnthread *thread) +int xnthread_join(struct xnthread *thread, bool uninterruptible) { unsigned int tag; spl_t s; @@ -1541,7 +1541,10 @@ int xnthread_join(struct xnthread *thread) * wait queue is quite unlikely. In any case, we run in * secondary mode. */ - if (wait_event_interruptible(nkjoinq, thread-idtag != tag)) { + if (uninterruptible) + wait_event(nkjoinq, thread-idtag != tag); + else if (wait_event_interruptible(nkjoinq, + thread-idtag != tag)) { xnlock_get_irqsave(nklock, s); if (thread-idtag == tag) xnthread_clear_state(thread, XNJOINED); ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : cobalt/kernel: clean up timers on __xnthread_init errors
Module: xenomai-jki Branch: for-forge Commit: a3faf9b653dfbdbde8cafdf1b28063a32d0fb136 URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=a3faf9b653dfbdbde8cafdf1b28063a32d0fb136 Author: Jan Kiszka jan.kis...@siemens.com Date: Mon Nov 18 18:50:54 2013 +0100 cobalt/kernel: clean up timers on __xnthread_init errors Initializes timers may have been registered for statistical purposes, so we must not leave them hanging around if __xnthread_init fails. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kernel/cobalt/thread.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c index ed9937a..0b61380 100644 --- a/kernel/cobalt/thread.c +++ b/kernel/cobalt/thread.c @@ -197,14 +197,23 @@ int __xnthread_init(struct xnthread *thread, thread-init_schedparam = *sched_param; ret = xnsched_init_thread(thread); if (ret) - return ret; + goto err_out; ret = xnsched_set_policy(thread, sched_class, sched_param); if (ret) - return ret; + goto err_out; - if ((flags (XNUSER|XNROOT)) == 0) + if ((flags (XNUSER|XNROOT)) == 0) { ret = spawn_kthread(thread); + if (ret) + goto err_out; + } + + return 0; + +err_out: + xntimer_destroy(thread-rtimer); + xntimer_destroy(thread-ptimer); return ret; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Gernot Hillier : Silence unused_result warning from write()
Module: xenomai-jki Branch: for-forge Commit: 520fc6ac080f2b4a47e39eaa7838270fb2768748 URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=520fc6ac080f2b4a47e39eaa7838270fb2768748 Author: Gernot Hillier gernot.hill...@siemens.com Date: Tue Jan 14 13:28:16 2014 +0100 Silence unused_result warning from write() Some glibc versions mark write() with attribute warn_unused_result (found in Ubuntu 12.04 / eglibc 2.15 / gcc 4.6.3), so we need to silence this warning, especially because we're building with -Werror. Signed-off-by: Gernot Hillier gernot.hill...@siemens.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- lib/cobalt/init.c |3 ++- testsuite/latency/latency.c |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c index 0c2b29a..c3086a9 100644 --- a/lib/cobalt/init.c +++ b/lib/cobalt/init.c @@ -54,7 +54,8 @@ int __rtdm_fd_start = INT_MAX; static void sigill_handler(int sig) { const char m[] = no Xenomai support in kernel?\n; - write(2, m, sizeof(m) - 1); + ssize_t rc __attribute__ ((unused)); + rc = write(2, m, sizeof(m) - 1); exit(EXIT_FAILURE); } diff --git a/testsuite/latency/latency.c b/testsuite/latency/latency.c index 6325672..12b90a9 100644 --- a/testsuite/latency/latency.c +++ b/testsuite/latency/latency.c @@ -507,7 +507,7 @@ static void sigdebug(int sig, siginfo_t *si, void *context) case SIGDEBUG_WATCHDOG: n = snprintf(buffer, sizeof(buffer), %s\n, reason_str[reason]); - write(STDERR_FILENO, buffer, n); + n = write(STDERR_FILENO, buffer, n); exit(EXIT_FAILURE); } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : cobalt: Add missing prefix to sc_cobalt_check_init
Module: xenomai-jki Branch: for-forge Commit: 57e7085cfd6ce57fb84a6d21586e558c0d98335f URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=57e7085cfd6ce57fb84a6d21586e558c0d98335f Author: Jan Kiszka jan.kis...@siemens.com Date: Mon Nov 11 18:33:01 2013 +0100 cobalt: Add missing prefix to sc_cobalt_check_init Pure cosmetic, no functional change. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- include/cobalt/uapi/syscall.h |2 +- kernel/cobalt/posix/syscall.c |2 +- lib/cobalt/mutex.c|2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/cobalt/uapi/syscall.h b/include/cobalt/uapi/syscall.h index f8d1511..d536c89 100644 --- a/include/cobalt/uapi/syscall.h +++ b/include/cobalt/uapi/syscall.h @@ -40,7 +40,7 @@ #define sc_cobalt_clock_settime 16 #define sc_cobalt_clock_nanosleep 17 #define sc_cobalt_mutex_init18 -#define sc_cobalt_check_init19 +#define sc_cobalt_mutex_check_init 19 #define sc_cobalt_mutex_destroy 20 #define sc_cobalt_mutex_lock21 #define sc_cobalt_mutex_timedlock 22 diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c index f79fa60..3848b9a 100644 --- a/kernel/cobalt/posix/syscall.c +++ b/kernel/cobalt/posix/syscall.c @@ -111,7 +111,7 @@ static struct xnsyscall cobalt_syscalls[] = { SKINCALL_DEF(sc_cobalt_clock_settime, cobalt_clock_settime, any), SKINCALL_DEF(sc_cobalt_clock_nanosleep, cobalt_clock_nanosleep, nonrestartable), SKINCALL_DEF(sc_cobalt_mutex_init, cobalt_mutex_init, any), - SKINCALL_DEF(sc_cobalt_check_init, cobalt_mutex_check_init, any), + SKINCALL_DEF(sc_cobalt_mutex_check_init, cobalt_mutex_check_init, any), SKINCALL_DEF(sc_cobalt_mutex_destroy, cobalt_mutex_destroy, any), SKINCALL_DEF(sc_cobalt_mutex_lock, cobalt_mutex_lock, primary), SKINCALL_DEF(sc_cobalt_mutex_timedlock, cobalt_mutex_timedlock, primary), diff --git a/lib/cobalt/mutex.c b/lib/cobalt/mutex.c index 9655eca..39d85a4 100644 --- a/lib/cobalt/mutex.c +++ b/lib/cobalt/mutex.c @@ -83,7 +83,7 @@ COBALT_IMPL(int, pthread_mutex_init, (pthread_mutex_t *mutex, if (_mutex-magic == COBALT_MUTEX_MAGIC) { err = -XENOMAI_SKINCALL1(__cobalt_muxid, -sc_cobalt_check_init,_mutex); +sc_cobalt_mutex_check_init,_mutex); if (err) return err; ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : Provide native alias in xeno-config
Module: xenomai-jki Branch: for-forge Commit: 109eb58485135bca036131ef1db9828ef929816c URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=109eb58485135bca036131ef1db9828ef929816c Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Jan 17 12:58:35 2014 +0100 Provide native alias in xeno-config This helps migrating from Xenomai 2. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- scripts/xeno-config-cobalt.in |3 +++ scripts/xeno-config-mercury.in |3 +++ 2 files changed, 6 insertions(+) diff --git a/scripts/xeno-config-cobalt.in b/scripts/xeno-config-cobalt.in index 04ae887..69e741d 100644 --- a/scripts/xeno-config-cobalt.in +++ b/scripts/xeno-config-cobalt.in @@ -126,6 +126,9 @@ while test $# -gt 0; do fi cflags=$XENO_BASE_CFLAGS -I$XENO_INCLUDE_DIR/cobalt for skin in $skin_list; do + if [ $skin == native ]; then + skin=alchemy + fi case $skin in posix|cobalt) ;; diff --git a/scripts/xeno-config-mercury.in b/scripts/xeno-config-mercury.in index 287639e..aa0d750 100644 --- a/scripts/xeno-config-mercury.in +++ b/scripts/xeno-config-mercury.in @@ -105,6 +105,9 @@ while test $# -gt 0; do fi cflags=$XENO_BASE_CFLAGS for skin in $skin_list; do + if [ $skin == native ]; then + skin=alchemy + fi case $skin in vxworks|psos|alchemy) cflags=$cflags -I$XENO_INCLUDE_DIR/$skin ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : switchtest: Bail out early from rtswitch_ktask on termination
Module: xenomai-jki Branch: for-forge Commit: 7c3dfd6fd7d8f605c40713429a88b2abf08a02dc URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=7c3dfd6fd7d8f605c40713429a88b2abf08a02dc Author: Jan Kiszka jan.kis...@siemens.com Date: Mon Nov 18 19:08:11 2013 +0100 switchtest: Bail out early from rtswitch_ktask on termination rtswitch_pend_rt may have been interrupted if the task is supposed to stop. Reorder the test for this in order to avoid starting to run on invalid data. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kernel/drivers/testing/switchtest.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/drivers/testing/switchtest.c b/kernel/drivers/testing/switchtest.c index b7b6a21..354dece 100644 --- a/kernel/drivers/testing/switchtest.c +++ b/kernel/drivers/testing/switchtest.c @@ -400,7 +400,7 @@ static void rtswitch_ktask(void *cookie) rtswitch_pend_rt(ctx, task-base.index); - for(;;) { + while (!rtdm_task_should_stop()) { if (task-base.flags RTTST_SWTEST_USE_FPU) fp_regs_set(fp_features, task-base.index + i * 1000); @@ -433,9 +433,6 @@ static void rtswitch_ktask(void *cookie) } } - if (rtdm_task_should_stop()) - break; - if (++i == 400) i = 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : clocktest: Update to new clocks and clock encoding scheme
Module: xenomai-jki Branch: for-forge Commit: ff6ebca96f9bc7d340a106d43301cfafe28f226f URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=ff6ebca96f9bc7d340a106d43301cfafe28f226f Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Nov 8 19:04:11 2013 +0100 clocktest: Update to new clocks and clock encoding scheme Add -E command line option to specify an extension clock more conveniently. CLOCK_HOST_REALTIME is not selected by -E -C 42. Also add decoding of CLOCK_MONOTONIC_RAW. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- testsuite/clocktest/clocktest.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/testsuite/clocktest/clocktest.c b/testsuite/clocktest/clocktest.c index 3a34998..cea8de3 100644 --- a/testsuite/clocktest/clocktest.c +++ b/testsuite/clocktest/clocktest.c @@ -246,13 +246,18 @@ int main(int argc, char *argv[]) int i; int c; int d = 0; + int ext = 0; - while ((c = getopt(argc, argv, C:T:D)) != EOF) + while ((c = getopt(argc, argv, C:ET:D)) != EOF) switch (c) { case 'C': clock_id = atoi(optarg); break; + case 'E': + ext = 1; + break; + case 'T': alarm(atoi(optarg)); break; @@ -264,6 +269,7 @@ int main(int argc, char *argv[]) default: fprintf(stderr, usage: clocktest [options]\n [-C clock_id] # tested clock, default=%d (CLOCK_REALTIME)\n + [-E] # -C specifies extension clock\n [-T test_duration_seconds] # default=0, so ^C to end\n [-D] # print extra diagnostics for CLOCK_HOST_REALTIME\n, CLOCK_REALTIME); @@ -276,6 +282,8 @@ int main(int argc, char *argv[]) init_lock(lock); + if (ext) + clock_id = __COBALT_CLOCK_CODE(clock_id); if (d clock_id == CLOCK_HOST_REALTIME) show_hostrt_diagnostics(); @@ -292,7 +300,8 @@ int main(int argc, char *argv[]) (void *)(long)i); } - printf(== Tested clock: %d (, clock_id); + printf(== Tested %sclock: %d (, ext ? extension : , + __COBALT_CLOCK_INDEX(clock_id)); switch (clock_id) { case CLOCK_REALTIME: printf(CLOCK_REALTIME); @@ -302,6 +311,10 @@ int main(int argc, char *argv[]) printf(CLOCK_MONOTONIC); break; + case CLOCK_MONOTONIC_RAW: + printf(CLOCK_MONOTONIC_RAW); + break; + case CLOCK_HOST_REALTIME: printf(CLOCK_HOST_REALTIME); break; ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : doc: regenerate documentation
Module: xenomai-forge Branch: next Commit: 0c1c2793edb3909dc4b9f105d3c9c8263984bb3a URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=0c1c2793edb3909dc4b9f105d3c9c8263984bb3a Author: Philippe Gerum r...@xenomai.org Date: Fri Jan 17 15:28:53 2014 +0100 doc: regenerate documentation --- README.INSTALL|4 +- doc/generated/html/MIGRATION/index.html | 1037 + doc/generated/html/README.APPLICATIONS/index.html |6 +- doc/generated/html/README.INSTALL/index.html |8 +- doc/generated/pdf/MIGRATION.pdf | Bin 0 - 131373 bytes doc/generated/pdf/README.APPLICATIONS.pdf | Bin 84800 - 84797 bytes doc/generated/pdf/README.INSTALL.pdf | Bin 171299 - 171295 bytes doc/generated/pdf/TROUBLESHOOTING.pdf | Bin 118907 - 118907 bytes 8 files changed, 1046 insertions(+), 9 deletions(-) diff --git a/README.INSTALL b/README.INSTALL index 7c21cec..4ec8330 100644 --- a/README.INSTALL +++ b/README.INSTALL @@ -93,8 +93,8 @@ The kernel/ sub-tree which implements the in-kernel support code is seen as a built-in extension of the Linux kernel. Therefore, the standard Linux kernel configuration process should be used to define the various settings for the Xenomai kernel components. All of the kernel code Xenomai currently introduces -is for supporting the Cobalt core (i.e. dual kernel configuration). As of -today, the Mercury core needs no Xenomai-specific code in kernel space. +implements the Cobalt core (i.e. dual kernel configuration). As of today, the +Mercury core needs no Xenomai-specific code in kernel space. The lib/ sub-tree contains the various user-space libraries exported by the Xenomai framework to the applications. This tree is built separately from the diff --git a/doc/generated/html/MIGRATION/index.html b/doc/generated/html/MIGRATION/index.html new file mode 100644 index 000..7d96e20 --- /dev/null +++ b/doc/generated/html/MIGRATION/index.html @@ -0,0 +1,1037 @@ +!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN +http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; +html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en +head +meta http-equiv=Content-Type content=application/xhtml+xml; charset=UTF-8 / +meta name=generator content=AsciiDoc 8.6.8 / +titleMigrating from Xenomai 2.x to 2.99.0/title +link rel=stylesheet href=../asciidoc-css/asciidoc.css type=text/css / + + +script type=text/javascript src=../asciidoc-js/asciidoc.js/script +script type=text/javascript +/*![CDATA[*/ +asciidoc.install(3); +/*]]*/ +/script +/head +body class=article style=max-width:55em +div id=header +h1Migrating from Xenomai 2.x to 2.99.0/h1 +div id=toc + div id=toctitleTable of Contents/div + noscriptpbJavaScript must be enabled in your browser to display the table of contents./b/p/noscript +/div +/div +div id=content +div id=preamble +div class=sectionbody +div class=paragraphpThe latest version of this document is available at +a href=http://www.xenomai.org/documentation/xenomai-forge/html/MIGRATION/;this address/a./p/div +div class=paragraphpFor questions, corrections and improvements, write to +a href=mailto:xeno...@xenomai.org;the mailing list/a./p/div +/div +/div +div class=sect1 +h2 id=_configuration1. Configuration/h2 +div class=sectionbody +div class=ulistdiv class=titleUser programs and libraries/divul +li +p +As with Xenomai 2.x, codexeno-config/code is available for retrieving the +compilation and link flags for building Xenomai 3.x applications. This +script will work for both the Cobalt and Mercury environments +indifferently. +/p +div class=ulistul +li +p +Each code--skin=lt;apigt;/code option specifier can be abbreviated as + --lt;apigt;. For instance, code--psos/code is a shorthand for code--skin=psos/code on + the command line. +/p +/li +li +p +Specifying code--[skin=]cobalt/code or code--[skin=]posix/code on the command line + is strictly equivalent. However, this does not make sense with + emMercury/em which does not define these switches. +/p +/li +li +p +code--[skin=]alchemy/code replaces the former code--skin=native/code switch. +/p +/li +li +p +code--core/code can be used to retrieve the name of the Xenomai core system + for which codexeno-config/code was generated. Possible output values are + codecobalt/code and codemercury/code. +/p +/li +li +p +code--no-auto-init/code can be passed to disable automatic initialization + of the Copperplate library when the application process enters the + codemain()/code routine. In such a case, the application code using any API + based on the Copperplate layer, shall call the codecopperplate_init()/code + routine manually, as part of its initialization process, embefore/em + any real-time service is invoked. +/p +/li +/ul/div +/li +li +p +code--enable-x86-sep/code was renamed to code--enable-x86-vsyscall/code to fix a + misnomer. This option should be left enabled (default), unless +
[Xenomai-git] Jan Kiszka : cobalt/syscall: Add missing prefix to sc_cobalt_check_init
Module: xenomai-forge Branch: next Commit: ff38853428afe9c42af1c1ca98f3bfec3bcd044a URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=ff38853428afe9c42af1c1ca98f3bfec3bcd044a Author: Jan Kiszka jan.kis...@siemens.com Date: Mon Nov 11 18:33:01 2013 +0100 cobalt/syscall: Add missing prefix to sc_cobalt_check_init Pure cosmetic, no functional change. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- include/cobalt/uapi/syscall.h |2 +- kernel/cobalt/posix/syscall.c |2 +- lib/cobalt/mutex.c|2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/cobalt/uapi/syscall.h b/include/cobalt/uapi/syscall.h index f8d1511..d536c89 100644 --- a/include/cobalt/uapi/syscall.h +++ b/include/cobalt/uapi/syscall.h @@ -40,7 +40,7 @@ #define sc_cobalt_clock_settime 16 #define sc_cobalt_clock_nanosleep 17 #define sc_cobalt_mutex_init18 -#define sc_cobalt_check_init19 +#define sc_cobalt_mutex_check_init 19 #define sc_cobalt_mutex_destroy 20 #define sc_cobalt_mutex_lock21 #define sc_cobalt_mutex_timedlock 22 diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c index f79fa60..3848b9a 100644 --- a/kernel/cobalt/posix/syscall.c +++ b/kernel/cobalt/posix/syscall.c @@ -111,7 +111,7 @@ static struct xnsyscall cobalt_syscalls[] = { SKINCALL_DEF(sc_cobalt_clock_settime, cobalt_clock_settime, any), SKINCALL_DEF(sc_cobalt_clock_nanosleep, cobalt_clock_nanosleep, nonrestartable), SKINCALL_DEF(sc_cobalt_mutex_init, cobalt_mutex_init, any), - SKINCALL_DEF(sc_cobalt_check_init, cobalt_mutex_check_init, any), + SKINCALL_DEF(sc_cobalt_mutex_check_init, cobalt_mutex_check_init, any), SKINCALL_DEF(sc_cobalt_mutex_destroy, cobalt_mutex_destroy, any), SKINCALL_DEF(sc_cobalt_mutex_lock, cobalt_mutex_lock, primary), SKINCALL_DEF(sc_cobalt_mutex_timedlock, cobalt_mutex_timedlock, primary), diff --git a/lib/cobalt/mutex.c b/lib/cobalt/mutex.c index 9655eca..39d85a4 100644 --- a/lib/cobalt/mutex.c +++ b/lib/cobalt/mutex.c @@ -83,7 +83,7 @@ COBALT_IMPL(int, pthread_mutex_init, (pthread_mutex_t *mutex, if (_mutex-magic == COBALT_MUTEX_MAGIC) { err = -XENOMAI_SKINCALL1(__cobalt_muxid, -sc_cobalt_check_init,_mutex); +sc_cobalt_mutex_check_init,_mutex); if (err) return err; ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : testsuite/xeno-test: Use new -E switch of clocktest
Module: xenomai-forge Branch: next Commit: cd854383525cca06bfecb16850ba069505012e80 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=cd854383525cca06bfecb16850ba069505012e80 Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Nov 8 19:24:37 2013 +0100 testsuite/xeno-test: Use new -E switch of clocktest Just to make sure it's used in our own testsuite. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- testsuite/xeno-test/xeno-test.in |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/xeno-test/xeno-test.in b/testsuite/xeno-test/xeno-test.in index ea3c042..9b00b55 100644 --- a/testsuite/xeno-test/xeno-test.in +++ b/testsuite/xeno-test/xeno-test.in @@ -45,7 +45,7 @@ echo 0 /proc/xenomai/latency || : testdir=@testdir@ $testdir/arith -$testdir/clocktest -D -T 30 -C 65578 || $testdir/clocktest -T 30 +$testdir/clocktest -D -T 30 -E -C 42 || $testdir/clocktest -T 30 $testdir/switchtest -T 30 $testdir/cond-torture # $testdir/mutex-torture ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : scripts: Provide native alias in xeno-config
Module: xenomai-forge Branch: next Commit: 1dba7f3b7cc7825cb9e5aac7d6e2b4c97a6a8237 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=1dba7f3b7cc7825cb9e5aac7d6e2b4c97a6a8237 Author: Jan Kiszka jan.kis...@siemens.com Date: Fri Jan 17 12:58:35 2014 +0100 scripts: Provide native alias in xeno-config This helps migrating from Xenomai 2. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- scripts/xeno-config-cobalt.in |3 +++ scripts/xeno-config-mercury.in |3 +++ 2 files changed, 6 insertions(+) diff --git a/scripts/xeno-config-cobalt.in b/scripts/xeno-config-cobalt.in index 04ae887..69e741d 100644 --- a/scripts/xeno-config-cobalt.in +++ b/scripts/xeno-config-cobalt.in @@ -126,6 +126,9 @@ while test $# -gt 0; do fi cflags=$XENO_BASE_CFLAGS -I$XENO_INCLUDE_DIR/cobalt for skin in $skin_list; do + if [ $skin == native ]; then + skin=alchemy + fi case $skin in posix|cobalt) ;; diff --git a/scripts/xeno-config-mercury.in b/scripts/xeno-config-mercury.in index 287639e..aa0d750 100644 --- a/scripts/xeno-config-mercury.in +++ b/scripts/xeno-config-mercury.in @@ -105,6 +105,9 @@ while test $# -gt 0; do fi cflags=$XENO_BASE_CFLAGS for skin in $skin_list; do + if [ $skin == native ]; then + skin=alchemy + fi case $skin in vxworks|psos|alchemy) cflags=$cflags -I$XENO_INCLUDE_DIR/$skin ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : doc: regenerate documentation
Module: xenomai-forge Branch: next Commit: bf3a1b1df9f7df874e36faf60b6e5311ecfeb913 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=bf3a1b1df9f7df874e36faf60b6e5311ecfeb913 Author: Philippe Gerum r...@xenomai.org Date: Fri Jan 17 15:35:15 2014 +0100 doc: regenerate documentation --- README.INSTALL|4 +- doc/generated/html/MIGRATION/index.html | 1037 + doc/generated/html/README.APPLICATIONS/index.html |6 +- doc/generated/html/README.INSTALL/index.html |8 +- doc/generated/pdf/MIGRATION.pdf | Bin 0 - 131373 bytes doc/generated/pdf/README.APPLICATIONS.pdf | Bin 84800 - 84797 bytes doc/generated/pdf/README.INSTALL.pdf | Bin 171299 - 171295 bytes doc/generated/pdf/TROUBLESHOOTING.pdf | Bin 118907 - 118907 bytes 8 files changed, 1046 insertions(+), 9 deletions(-) diff --git a/README.INSTALL b/README.INSTALL index 7c21cec..4ec8330 100644 --- a/README.INSTALL +++ b/README.INSTALL @@ -93,8 +93,8 @@ The kernel/ sub-tree which implements the in-kernel support code is seen as a built-in extension of the Linux kernel. Therefore, the standard Linux kernel configuration process should be used to define the various settings for the Xenomai kernel components. All of the kernel code Xenomai currently introduces -is for supporting the Cobalt core (i.e. dual kernel configuration). As of -today, the Mercury core needs no Xenomai-specific code in kernel space. +implements the Cobalt core (i.e. dual kernel configuration). As of today, the +Mercury core needs no Xenomai-specific code in kernel space. The lib/ sub-tree contains the various user-space libraries exported by the Xenomai framework to the applications. This tree is built separately from the diff --git a/doc/generated/html/MIGRATION/index.html b/doc/generated/html/MIGRATION/index.html new file mode 100644 index 000..7d96e20 --- /dev/null +++ b/doc/generated/html/MIGRATION/index.html @@ -0,0 +1,1037 @@ +!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN +http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; +html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en +head +meta http-equiv=Content-Type content=application/xhtml+xml; charset=UTF-8 / +meta name=generator content=AsciiDoc 8.6.8 / +titleMigrating from Xenomai 2.x to 2.99.0/title +link rel=stylesheet href=../asciidoc-css/asciidoc.css type=text/css / + + +script type=text/javascript src=../asciidoc-js/asciidoc.js/script +script type=text/javascript +/*![CDATA[*/ +asciidoc.install(3); +/*]]*/ +/script +/head +body class=article style=max-width:55em +div id=header +h1Migrating from Xenomai 2.x to 2.99.0/h1 +div id=toc + div id=toctitleTable of Contents/div + noscriptpbJavaScript must be enabled in your browser to display the table of contents./b/p/noscript +/div +/div +div id=content +div id=preamble +div class=sectionbody +div class=paragraphpThe latest version of this document is available at +a href=http://www.xenomai.org/documentation/xenomai-forge/html/MIGRATION/;this address/a./p/div +div class=paragraphpFor questions, corrections and improvements, write to +a href=mailto:xeno...@xenomai.org;the mailing list/a./p/div +/div +/div +div class=sect1 +h2 id=_configuration1. Configuration/h2 +div class=sectionbody +div class=ulistdiv class=titleUser programs and libraries/divul +li +p +As with Xenomai 2.x, codexeno-config/code is available for retrieving the +compilation and link flags for building Xenomai 3.x applications. This +script will work for both the Cobalt and Mercury environments +indifferently. +/p +div class=ulistul +li +p +Each code--skin=lt;apigt;/code option specifier can be abbreviated as + --lt;apigt;. For instance, code--psos/code is a shorthand for code--skin=psos/code on + the command line. +/p +/li +li +p +Specifying code--[skin=]cobalt/code or code--[skin=]posix/code on the command line + is strictly equivalent. However, this does not make sense with + emMercury/em which does not define these switches. +/p +/li +li +p +code--[skin=]alchemy/code replaces the former code--skin=native/code switch. +/p +/li +li +p +code--core/code can be used to retrieve the name of the Xenomai core system + for which codexeno-config/code was generated. Possible output values are + codecobalt/code and codemercury/code. +/p +/li +li +p +code--no-auto-init/code can be passed to disable automatic initialization + of the Copperplate library when the application process enters the + codemain()/code routine. In such a case, the application code using any API + based on the Copperplate layer, shall call the codecopperplate_init()/code + routine manually, as part of its initialization process, embefore/em + any real-time service is invoked. +/p +/li +/ul/div +/li +li +p +code--enable-x86-sep/code was renamed to code--enable-x86-vsyscall/code to fix a + misnomer. This option should be left enabled (default), unless +
[Xenomai-git] Gernot Hillier : lib/cobalt, testsuite: Silence unused_result warning from write()
Module: xenomai-forge Branch: next Commit: 0ae975fae660f4cec11af744a321aaa0bfa24424 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=0ae975fae660f4cec11af744a321aaa0bfa24424 Author: Gernot Hillier gernot.hill...@siemens.com Date: Tue Jan 14 13:28:16 2014 +0100 lib/cobalt, testsuite: Silence unused_result warning from write() Some glibc versions mark write() with attribute warn_unused_result (found in Ubuntu 12.04 / eglibc 2.15 / gcc 4.6.3), so we need to silence this warning, especially because we're building with -Werror. Signed-off-by: Gernot Hillier gernot.hill...@siemens.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- lib/cobalt/init.c |3 ++- testsuite/latency/latency.c |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c index 0c2b29a..c3086a9 100644 --- a/lib/cobalt/init.c +++ b/lib/cobalt/init.c @@ -54,7 +54,8 @@ int __rtdm_fd_start = INT_MAX; static void sigill_handler(int sig) { const char m[] = no Xenomai support in kernel?\n; - write(2, m, sizeof(m) - 1); + ssize_t rc __attribute__ ((unused)); + rc = write(2, m, sizeof(m) - 1); exit(EXIT_FAILURE); } diff --git a/testsuite/latency/latency.c b/testsuite/latency/latency.c index 6325672..12b90a9 100644 --- a/testsuite/latency/latency.c +++ b/testsuite/latency/latency.c @@ -507,7 +507,7 @@ static void sigdebug(int sig, siginfo_t *si, void *context) case SIGDEBUG_WATCHDOG: n = snprintf(buffer, sizeof(buffer), %s\n, reason_str[reason]); - write(STDERR_FILENO, buffer, n); + n = write(STDERR_FILENO, buffer, n); exit(EXIT_FAILURE); } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : testsuite/switchtest: Bail out early from rtswitch_ktask on termination
Module: xenomai-forge Branch: next Commit: 76938af20b38e33954b9b7133f0055187f26f24f URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=76938af20b38e33954b9b7133f0055187f26f24f Author: Jan Kiszka jan.kis...@siemens.com Date: Mon Nov 18 19:08:11 2013 +0100 testsuite/switchtest: Bail out early from rtswitch_ktask on termination rtswitch_pend_rt may have been interrupted if the task is supposed to stop. Reorder the test for this in order to avoid starting to run on invalid data. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kernel/drivers/testing/switchtest.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/drivers/testing/switchtest.c b/kernel/drivers/testing/switchtest.c index b7b6a21..354dece 100644 --- a/kernel/drivers/testing/switchtest.c +++ b/kernel/drivers/testing/switchtest.c @@ -400,7 +400,7 @@ static void rtswitch_ktask(void *cookie) rtswitch_pend_rt(ctx, task-base.index); - for(;;) { + while (!rtdm_task_should_stop()) { if (task-base.flags RTTST_SWTEST_USE_FPU) fp_regs_set(fp_features, task-base.index + i * 1000); @@ -433,9 +433,6 @@ static void rtswitch_ktask(void *cookie) } } - if (rtdm_task_should_stop()) - break; - if (++i == 400) i = 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : testsuite/switchtest: Avoid clashes RTSWITCH_* vs. RTTST_SWTEST_* constants
Module: xenomai-forge Branch: next Commit: 2d83807adee6d6f4abaaa8b5608cb2027916a15b URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=2d83807adee6d6f4abaaa8b5608cb2027916a15b Author: Jan Kiszka jan.kis...@siemens.com Date: Wed Nov 20 19:53:12 2013 +0100 testsuite/switchtest: Avoid clashes RTSWITCH_* vs. RTTST_SWTEST_* constants Namely RTTST_SWTEST_FREEZE and RTSWITCH_RT were using the same value. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kernel/drivers/testing/switchtest.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/drivers/testing/switchtest.c b/kernel/drivers/testing/switchtest.c index 354dece..4523917 100644 --- a/kernel/drivers/testing/switchtest.c +++ b/kernel/drivers/testing/switchtest.c @@ -8,9 +8,9 @@ #include rtdm/driver.h #include asm/xenomai/fptest.h -#define RTSWITCH_RT 0x4 +#define RTSWITCH_RT 0x1 #define RTSWITCH_NRT 0 -#define RTSWITCH_KERNEL 0x8 +#define RTSWITCH_KERNEL 0x2 typedef struct { struct rttst_swtest_task base; ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git