[Xenomai-git] Philippe Gerum : cobalt/posix/clock: fix clock codes
Module: xenomai-forge Branch: next Commit: 937ead4abe6deb66b85e140a3a97ac88de88a3f8 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=937ead4abe6deb66b85e140a3a97ac88de88a3f8 Author: Philippe Gerum Date: Mon Aug 18 17:27:38 2014 +0200 cobalt/posix/clock: fix clock codes We want all clock IDs to be usable in Cobalt calls receiving a clock argument (i.e. standard, statically or dynamically defined extension clocks). This change fixes up the clock identifier namespaces and encoding accordingly. --- include/cobalt/uapi/thread.h|2 +- include/cobalt/uapi/time.h | 18 ++ kernel/cobalt/posix/clock.c |4 ++-- testsuite/clocktest/clocktest.c |4 ++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/include/cobalt/uapi/thread.h b/include/cobalt/uapi/thread.h index 94c378a..3264cdd 100644 --- a/include/cobalt/uapi/thread.h +++ b/include/cobalt/uapi/thread.h @@ -32,7 +32,7 @@ struct cobalt_mutexattr { }; struct cobalt_condattr { - int clock : 3; + int clock : 6; int pshared : 2; }; diff --git a/include/cobalt/uapi/time.h b/include/cobalt/uapi/time.h index 764c74c..10ad8ce 100644 --- a/include/cobalt/uapi/time.h +++ b/include/cobalt/uapi/time.h @@ -27,17 +27,19 @@ * of the POSIX and Linux kernel definitions so that no ambiguities * arise when porting applications in both directions. * - * The Cobalt API reserves the first 32 extended clock codes. for - * dynamically registered clocks. Everything from - * __COBALT_CLOCK_CODE(32) onward can be reserved statically for - * whatever purpose. + * 0 .. 7 regular POSIX/linux clock ids. + * 8 .. 31 statically reserved Cobalt clocks + * 32 .. 63 dynamically registered Cobalt clocks (external) */ +#define __COBALT_CLOCK_STATIC(nr) ((clockid_t)(nr + 8)) + +#define CLOCK_HOST_REALTIME __COBALT_CLOCK_STATIC(0) + #define COBALT_MAX_EXTCLOCKS 32 -#define __COBALT_CLOCK_CODE(num) ((clockid_t)((1 << 16)|num)) -#define __COBALT_CLOCK_INDEX(id) ((int)(id) & ~(1 << 16)) -#define __COBALT_CLOCK_EXT_P(id) ((int)(id) & (1 << 16)) -#define CLOCK_HOST_REALTIME __COBALT_CLOCK_CODE(42) +#define __COBALT_CLOCK_EXT(nr) ((clockid_t)(nr) | (1 << 5)) +#define __COBALT_CLOCK_EXT_P(id) ((int)(id) & (1 << 5)) +#define __COBALT_CLOCK_EXT_INDEX(id) ((int)(id) & ~(1 << 5)) /* * Additional timerfd defines diff --git a/kernel/cobalt/posix/clock.c b/kernel/cobalt/posix/clock.c index 269aa64..21c3e4c 100644 --- a/kernel/cobalt/posix/clock.c +++ b/kernel/cobalt/posix/clock.c @@ -90,7 +90,7 @@ static int do_clock_host_realtime(struct timespec *tp) if (!__COBALT_CLOCK_EXT_P(__clock_id)) \ __val = -EINVAL;\ else { \ - __nr = __COBALT_CLOCK_INDEX(__clock_id);\ + __nr = __COBALT_CLOCK_EXT_INDEX(__clock_id);\ xnlock_get_irqsave(&nklock, __s); \ if (!test_bit(__nr, cobalt_clock_extids)) { \ xnlock_put_irqrestore(&nklock, __s);\ @@ -280,7 +280,7 @@ int cobalt_clock_register(struct xnclock *clock, clockid_t *clk_id) return ret; clock->id = nr; - *clk_id = __COBALT_CLOCK_CODE(clock->id); + *clk_id = __COBALT_CLOCK_EXT(clock->id); trace_cobalt_clock_register(clock->name, *clk_id); diff --git a/testsuite/clocktest/clocktest.c b/testsuite/clocktest/clocktest.c index cea8de3..267469e 100644 --- a/testsuite/clocktest/clocktest.c +++ b/testsuite/clocktest/clocktest.c @@ -283,7 +283,7 @@ int main(int argc, char *argv[]) init_lock(&lock); if (ext) - clock_id = __COBALT_CLOCK_CODE(clock_id); + clock_id = __COBALT_CLOCK_EXT(clock_id); if (d && clock_id == CLOCK_HOST_REALTIME) show_hostrt_diagnostics(); @@ -301,7 +301,7 @@ int main(int argc, char *argv[]) } printf("== Tested %sclock: %d (", ext ? "extension " : "", - __COBALT_CLOCK_INDEX(clock_id)); + __COBALT_CLOCK_EXT_INDEX(clock_id)); switch (clock_id) { case CLOCK_REALTIME: printf("CLOCK_REALTIME"); ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : cobalt/rtdm: fix rtdm_mmap_kmem() documentation
Module: xenomai-forge Branch: master Commit: fc477c8a73e48ab395e44c9fa0d4190ed68e0593 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=fc477c8a73e48ab395e44c9fa0d4190ed68e0593 Author: Philippe Gerum Date: Mon Aug 18 16:55:06 2014 +0200 cobalt/rtdm: fix rtdm_mmap_kmem() documentation --- kernel/cobalt/rtdm/drvlib.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cobalt/rtdm/drvlib.c b/kernel/cobalt/rtdm/drvlib.c index 3c1d2ed..54cf288 100644 --- a/kernel/cobalt/rtdm/drvlib.c +++ b/kernel/cobalt/rtdm/drvlib.c @@ -1811,7 +1811,7 @@ EXPORT_SYMBOL_GPL(rtdm_iomap_to_user); * Map a kernel logical memory range to a virtual user area. * * This routine is commonly used from a ->mmap() handler of a RTDM - * driver, for mapping a virtual memory area with no direct physical + * driver, for mapping a virtual memory area with a direct physical * mapping over the user address space referred to by @a vma. * * @param[in] vma The VMA descriptor to receive the mapping. ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : cobalt/rtdm: fix rtdm_mmap_kmem() documentation
Module: xenomai-forge Branch: next Commit: fc477c8a73e48ab395e44c9fa0d4190ed68e0593 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=fc477c8a73e48ab395e44c9fa0d4190ed68e0593 Author: Philippe Gerum Date: Mon Aug 18 16:55:06 2014 +0200 cobalt/rtdm: fix rtdm_mmap_kmem() documentation --- kernel/cobalt/rtdm/drvlib.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cobalt/rtdm/drvlib.c b/kernel/cobalt/rtdm/drvlib.c index 3c1d2ed..54cf288 100644 --- a/kernel/cobalt/rtdm/drvlib.c +++ b/kernel/cobalt/rtdm/drvlib.c @@ -1811,7 +1811,7 @@ EXPORT_SYMBOL_GPL(rtdm_iomap_to_user); * Map a kernel logical memory range to a virtual user area. * * This routine is commonly used from a ->mmap() handler of a RTDM - * driver, for mapping a virtual memory area with no direct physical + * driver, for mapping a virtual memory area with a direct physical * mapping over the user address space referred to by @a vma. * * @param[in] vma The VMA descriptor to receive the mapping. ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : cobalt/sched-quota: fix group deletion
Module: xenomai-forge Branch: next Commit: 312833bc2bb8f65246f6e170885b9fd1e7d10780 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=312833bc2bb8f65246f6e170885b9fd1e7d10780 Author: Philippe Gerum Date: Mon Aug 18 16:03:43 2014 +0200 cobalt/sched-quota: fix group deletion --- kernel/cobalt/sched-quota.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/cobalt/sched-quota.c b/kernel/cobalt/sched-quota.c index a5d98f4..2e0e649 100644 --- a/kernel/cobalt/sched-quota.c +++ b/kernel/cobalt/sched-quota.c @@ -531,7 +531,7 @@ int xnsched_quota_destroy_group(struct xnsched_quota_group *tg, { struct xnsched_quota *qs = &tg->sched->quota; union xnsched_policy_param param; - struct xnthread *thread; + struct xnthread *thread, *tmp; atomic_only(); @@ -539,7 +539,7 @@ int xnsched_quota_destroy_group(struct xnsched_quota_group *tg, if (!force) return -EBUSY; /* Move group members to the rt class. */ - list_for_each_entry(thread, &tg->members, quota_next) { + list_for_each_entry_safe(thread, tmp, &tg->members, quota_next) { param.rt.prio = thread->cprio; xnsched_set_policy(thread, &xnsched_class_rt, ¶m); } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : cobalt/sched-quota: fix group deletion
Module: xenomai-forge Branch: master Commit: 312833bc2bb8f65246f6e170885b9fd1e7d10780 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=312833bc2bb8f65246f6e170885b9fd1e7d10780 Author: Philippe Gerum Date: Mon Aug 18 16:03:43 2014 +0200 cobalt/sched-quota: fix group deletion --- kernel/cobalt/sched-quota.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/cobalt/sched-quota.c b/kernel/cobalt/sched-quota.c index a5d98f4..2e0e649 100644 --- a/kernel/cobalt/sched-quota.c +++ b/kernel/cobalt/sched-quota.c @@ -531,7 +531,7 @@ int xnsched_quota_destroy_group(struct xnsched_quota_group *tg, { struct xnsched_quota *qs = &tg->sched->quota; union xnsched_policy_param param; - struct xnthread *thread; + struct xnthread *thread, *tmp; atomic_only(); @@ -539,7 +539,7 @@ int xnsched_quota_destroy_group(struct xnsched_quota_group *tg, if (!force) return -EBUSY; /* Move group members to the rt class. */ - list_for_each_entry(thread, &tg->members, quota_next) { + list_for_each_entry_safe(thread, tmp, &tg->members, quota_next) { param.rt.prio = thread->cprio; xnsched_set_policy(thread, &xnsched_class_rt, ¶m); } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : lib/cobalt: drop wrapper on munmap()
Module: xenomai-forge Branch: master Commit: 19a4e1d9345c33b526964ae61514a2f9a3ab6621 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=19a4e1d9345c33b526964ae61514a2f9a3ab6621 Author: Philippe Gerum Date: Mon Aug 18 12:58:35 2014 +0200 lib/cobalt: drop wrapper on munmap() --- lib/cobalt/cobalt.wrappers |1 - 1 file changed, 1 deletion(-) diff --git a/lib/cobalt/cobalt.wrappers b/lib/cobalt/cobalt.wrappers index a4884ba..10cb36a 100644 --- a/lib/cobalt/cobalt.wrappers +++ b/lib/cobalt/cobalt.wrappers @@ -104,4 +104,3 @@ --wrap kill --wrap sleep --wrap mmap ---wrap munmap ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : lib/cobalt: drop wrapper on munmap()
Module: xenomai-forge Branch: next Commit: 19a4e1d9345c33b526964ae61514a2f9a3ab6621 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=19a4e1d9345c33b526964ae61514a2f9a3ab6621 Author: Philippe Gerum Date: Mon Aug 18 12:58:35 2014 +0200 lib/cobalt: drop wrapper on munmap() --- lib/cobalt/cobalt.wrappers |1 - 1 file changed, 1 deletion(-) diff --git a/lib/cobalt/cobalt.wrappers b/lib/cobalt/cobalt.wrappers index a4884ba..10cb36a 100644 --- a/lib/cobalt/cobalt.wrappers +++ b/lib/cobalt/cobalt.wrappers @@ -104,4 +104,3 @@ --wrap kill --wrap sleep --wrap mmap ---wrap munmap ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : doc: prebuild
Module: xenomai-forge Branch: next Commit: 2e6135cb7f12fc0aafe2777bf12fad71c2627af9 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=2e6135cb7f12fc0aafe2777bf12fad71c2627af9 Author: Philippe Gerum Date: Mon Aug 18 12:38:42 2014 +0200 doc: prebuild --- README.INSTALL |3 +- doc/asciidoc/MIGRATION.adoc| 33 +- doc/asciidoc/README.INSTALL.adoc |3 +- doc/prebuilt/html/MIGRATION/index.html | 44 +- doc/prebuilt/html/README.APPLICATIONS/index.html |2 +- doc/prebuilt/html/README.INSTALL/index.html|5 +- .../html/TROUBLESHOOTING.COBALT/index.html |2 +- .../html/TROUBLESHOOTING.MERCURY/index.html|2 +- doc/prebuilt/html/man1/autotune/index.html | 18 +- doc/prebuilt/html/man1/clocktest/index.html|2 +- doc/prebuilt/html/man1/dohell/index.html |2 +- doc/prebuilt/html/man1/latency/index.html |2 +- doc/prebuilt/html/man1/rtcanconfig/index.html |2 +- doc/prebuilt/html/man1/rtcanrecv/index.html|2 +- doc/prebuilt/html/man1/rtcansend/index.html|2 +- doc/prebuilt/html/man1/slackspot/index.html|2 +- doc/prebuilt/html/man1/switchtest/index.html |2 +- doc/prebuilt/html/man1/xeno-config/index.html |2 +- doc/prebuilt/html/man1/xeno-test/index.html|2 +- doc/prebuilt/html/man1/xeno/index.html |2 +- .../html/xeno3prm/16550A__io_8h_source.html|2 +- .../html/xeno3prm/16550A__pci_8h_source.html |2 +- .../html/xeno3prm/16550A__pnp_8h_source.html |2 +- doc/prebuilt/html/xeno3prm/8255_8h_source.html |2 +- doc/prebuilt/html/xeno3prm/analogy_2driver_8h.html |2 +- .../html/xeno3prm/analogy_2driver_8h_source.html | 40 +- doc/prebuilt/html/xeno3prm/analogy_8h.html |2 +- doc/prebuilt/html/xeno3prm/analogy_8h_source.html | 296 - doc/prebuilt/html/xeno3prm/annotated.html | 24 +- doc/prebuilt/html/xeno3prm/annotated.js|3 + doc/prebuilt/html/xeno3prm/apc_8h_source.html |2 +- doc/prebuilt/html/xeno3prm/api-tags.html |2 +- ..._2include_2asm_2xenomai_2machine_8h_source.html |2 +- ..._2include_2asm_2xenomai_2machine_8h_source.html |2 +- ..._2include_2asm_2xenomai_2machine_8h_source.html |2 +- ..._2include_2asm_2xenomai_2machine_8h_source.html |2 +- ..._2include_2asm_2xenomai_2machine_8h_source.html |2 +- ..._2include_2asm_2xenomai_2machine_8h_source.html |2 +- ...clude_2asm_2xenomai_2calibration_8h_source.html |2 +- ...m_2include_2asm_2xenomai_2fptest_8h_source.html |2 +- ...lude_2asm_2xenomai_2uapi_2fptest_8h_source.html |2 +- doc/prebuilt/html/xeno3prm/assert_8h_source.html |2 +- doc/prebuilt/html/xeno3prm/async_8c.html |2 +- doc/prebuilt/html/xeno3prm/atomic_8h_source.html |2 +- doc/prebuilt/html/xeno3prm/bheap_8h_source.html|2 +- ...clude_2asm_2xenomai_2calibration_8h_source.html |2 +- ...n_2include_2asm_2xenomai_2fptest_8h_source.html |2 +- ...lude_2asm_2xenomai_2uapi_2fptest_8h_source.html |2 +- .../boilerplate_2ancillaries_8h_source.html|2 +- .../html/xeno3prm/boilerplate_2list_8h_source.html |2 +- .../html/xeno3prm/boilerplate_2lock_8h_source.html |2 +- .../html/xeno3prm/boilerplate_2time_8h_source.html |2 +- doc/prebuilt/html/xeno3prm/bufd_8h_source.html |2 +- .../html/xeno3prm/bufp-label_8c-example.html |2 +- .../html/xeno3prm/bufp-readwrite_8c-example.html |2 +- doc/prebuilt/html/xeno3prm/c1e_8h_source.html |2 +- doc/prebuilt/html/xeno3prm/can-rtt_8c-example.html |2 +- doc/prebuilt/html/xeno3prm/channel__range_8h.html |2 +- .../html/xeno3prm/channel__range_8h_source.html|2 +- doc/prebuilt/html/xeno3prm/classes.html| 40 +- doc/prebuilt/html/xeno3prm/clockobj_8h_source.html | 446 +++-- doc/prebuilt/html/xeno3prm/cluster_8h_source.html |2 +- .../html/xeno3prm/cobalt-core_8h_source.html |2 +- .../html/xeno3prm/cobalt-posix_8h_source.html |2 +- .../html/xeno3prm/cobalt-rtdm_8h_source.html |2 +- .../cobalt_2boilerplate_2limits_8h_source.html |2 +- .../cobalt_2boilerplate_2trace_8h_source.html |2 +- .../cobalt_2kernel_2ancillaries_8h_source.html |2 +- .../xeno3prm/cobalt_2kernel_2list_8h_source.html |2 +- .../xeno3prm/cobalt_2kernel_2lock_8h_source.html |2 +- .../cobalt_2kernel_2registry_8h_source.html|2 +- .../cobalt_2kernel_2rtdm_2autotune_8h_source.html |2 +- .../xeno3prm/cobalt_2kernel_2rtdm_2can_8h.html |2 +- .../cobalt_2kernel_2rtdm_2can_8h_source.html |2 +- .../xeno3prm/cobalt_2kernel_2rtdm_2ipc_8h.html |2 +- .../cobalt_2kernel_2rtdm_2ipc_8h_source.html |2
[Xenomai-git] Philippe Gerum : config: bump core version
Module: xenomai-forge Branch: next Commit: 8a9b74d53da92b9a1fc0c78ae7bc3f61008b3182 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=8a9b74d53da92b9a1fc0c78ae7bc3f61008b3182 Author: Philippe Gerum Date: Mon Aug 18 12:35:25 2014 +0200 config: bump core version --- config/version |2 +- configure | 20 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config/version b/config/version index 324135c..bbb1516 100644 --- a/config/version +++ b/config/version @@ -1 +1 @@ -2.99.6 +2.99.7 diff --git a/configure b/configure index a9c9218..3b7fbb5 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Xenomai 2.99.6. +# Generated by GNU Autoconf 2.69 for Xenomai 2.99.7. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Xenomai' PACKAGE_TARNAME='xenomai' -PACKAGE_VERSION='2.99.6' -PACKAGE_STRING='Xenomai 2.99.6' +PACKAGE_VERSION='2.99.7' +PACKAGE_STRING='Xenomai 2.99.7' PACKAGE_BUGREPORT='xeno...@xenomai.org' PACKAGE_URL='' @@ -1420,7 +1420,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Xenomai 2.99.6 to adapt to many kinds of systems. +\`configure' configures Xenomai 2.99.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1491,7 +1491,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Xenomai 2.99.6:";; + short | recursive ) echo "Configuration of Xenomai 2.99.7:";; esac cat <<\_ACEOF @@ -1638,7 +1638,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Xenomai configure 2.99.6 +Xenomai configure 2.99.7 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2007,7 +2007,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Xenomai $as_me 2.99.6, which was +It was created by Xenomai $as_me 2.99.7, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4764,7 +4764,7 @@ fi # Define the identity of the package. PACKAGE='xenomai' - VERSION='2.99.6' + VERSION='2.99.7' cat >>confdefs.h <<_ACEOF @@ -14841,7 +14841,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Xenomai $as_me 2.99.6, which was +This file was extended by Xenomai $as_me 2.99.7, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES= $CONFIG_FILES @@ -14907,7 +14907,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/&/g'`" ac_cs_version="\\ -Xenomai config.status 2.99.6 +Xenomai config.status 2.99.7 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] New commits on branch master
URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=2e6135cb7f12fc0aafe2777bf12fad71c2627af9 Author: Philippe Gerum Date: Mon Aug 18 12:38:42 2014 +0200 doc: prebuild URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=8a9b74d53da92b9a1fc0c78ae7bc3f61008b3182 Author: Philippe Gerum Date: Mon Aug 18 12:35:25 2014 +0200 config: bump core version URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=b76363a9d13a9eeffdfb5a6d41c3a738ab6efa3e Author: Philippe Gerum Date: Mon Aug 18 11:04:29 2014 +0200 copperplate/version: emit build setup information To make sure we can get this information from different sources easily, sbin/version will dump the build setup flags when -a or --all is given, in addition to the version stamp. URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=f848180705633e260df84f601979d500a541bb0d Author: Philippe Gerum Date: Sun Aug 17 11:55:31 2014 +0200 cobalt, mercury: enable uClibc, NPTL/linuxthreads builds We allow building the Xenomai libraries and programs against uClibc and glibc-based toolchains for both Cobalt and Mercury configurations. We cope with NPTL and legacy linuxthreads for both as well. To this end, this patch moves all libc quirks to a separate header. URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=47bae8faa5c270d61cce8f36ef757fb5add0ab77 Author: Philippe Gerum Date: Sun Aug 17 17:57:28 2014 +0200 copperplate, trank: omit clock spec for condvar when useless URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=e760c1926a7191b8a68f491d9207c84a4c24125a Author: Philippe Gerum Date: Sun Aug 17 11:13:41 2014 +0200 lib/cobalt/blackfin: provide cobalt_read_tsc() URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=0d73a73c35a5d2fab3cc1ab6e65813e1cdc2fdde Author: Philippe Gerum Date: Sat Aug 16 10:41:21 2014 +0200 cobalt/rtdm: fix leakage on error in rtdm_irq_request() URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=215179174149de882295d4e2ed628eaa9e6b6169 Author: Jorge Ramirez-Ortiz Date: Fri Aug 15 09:48:43 2014 -0400 cobalt/rtdm: check xnintr_init error URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=456883d1ce5eb8f5ff9c458f7e0231801a4d6d78 Author: Jorge Ramirez-Ortiz Date: Fri Aug 15 16:23:08 2014 -0400 drivers/analogy: fix detach logic URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=c3fe4b40ff36c4426e1aea7dcea915abfa11ec9e Author: Jorge Ramirez-Ortiz Date: Thu Aug 14 09:37:27 2014 -0400 drivers/analogy: separate strings for boards and drivers URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=320bcddbea827a970998bbaee4977c0660ed7594 Author: Jorge Ramirez-Ortiz Date: Mon Aug 11 12:18:25 2014 -0400 drivers/analogy: report error when releasing an irq handler URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=560327f8a0bc4d30ae6b89dedfd92f93f9adc111 Author: Philippe Gerum Date: Fri Aug 15 19:13:17 2014 +0200 utils/autotune: allow for changing the sampling period URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=228ed8c1879d722c942d9475012a8e7e2e80b8f9 Author: Philippe Gerum Date: Fri Aug 15 18:49:31 2014 +0200 cobalt/heap: do not hold hard lock over unsafe area We might fault due to TLB misses on some platforms copying data over a shared heap, so do not hold any hard lock when doing so. URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=b9e8979379e40e9790007cdfdd157d34632f Author: Philippe Gerum Date: Fri Aug 15 18:23:56 2014 +0200 cobalt/rtdm, lib/cobalt: do not dereference path from open() wrapper In the event of receiving an invalid path pointer in open(), we don't want to dereference it from userland, but rather let the kernel handle the access trap gracefully, and send back -EFAULT to the library. For this reason, move the "/dev/" stripping to kernel space. URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=6d8886c30d4b981d9a84380e289daa6325865516 Author: Philippe Gerum Date: Fri Aug 15 13:07:18 2014 +0200 drivers/udd: expose file descriptor to ancillary I/O handlers The file descriptor may be needed for accessing context data, such as the device minor information. At this chance, the UDD core is also documented. URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=051c36b72164192dce38c63d475b6e6c217e38aa Author: Philippe Gerum Date: Fri Aug 15 12:49:51 2014 +0200 drivers/udd: allow for disabling notification URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=a2032a011a3ba76838925bef0fafd061b9e41452 Author: Philippe Gerum Date: Fri Aug 15 12:08:23 2014 +0200 cobalt/rtdm: separate calls for logical vs purely virtual mappings For the sake of clarity, introduce rtdm_mmap_vmem() for handling
[Xenomai-git] Philippe Gerum : cobalt, mercury: enable uClibc, NPTL/linuxthreads builds
Module: xenomai-forge Branch: next Commit: f848180705633e260df84f601979d500a541bb0d URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=f848180705633e260df84f601979d500a541bb0d Author: Philippe Gerum Date: Sun Aug 17 11:55:31 2014 +0200 cobalt, mercury: enable uClibc, NPTL/linuxthreads builds We allow building the Xenomai libraries and programs against uClibc and glibc-based toolchains for both Cobalt and Mercury configurations. We cope with NPTL and legacy linuxthreads for both as well. To this end, this patch moves all libc quirks to a separate header. --- configure| 23 +++- configure.ac | 28 - include/boilerplate/Makefile.am |1 + include/boilerplate/Makefile.in |1 + include/boilerplate/compiler.h |4 + include/boilerplate/libc.h | 175 ++ include/cobalt/pthread.h | 56 ++--- include/copperplate/clockobj.h | 44 ++- include/mercury/Makefile.am |2 + include/mercury/Makefile.in |8 +- include/mercury/pthread.h| 21 include/xeno_config.h.in | 30 + lib/alchemy/mutex.c |3 +- lib/copperplate/clockobj.c |7 ++ lib/copperplate/syncobj.c|6 +- lib/copperplate/threadobj.c |5 +- lib/vxworks/semLib.c |3 +- testsuite/regression/posix/leaks.c |7 +- testsuite/smokey/cond-torture/cond-torture.c | 15 +-- 19 files changed, 368 insertions(+), 71 deletions(-) diff --git a/configure b/configure index 6a2d951..00e96e0 100755 --- a/configure +++ b/configure @@ -13745,7 +13745,18 @@ done save_LIBS="$LIBS" LIBS="$LIBS -lrt -lpthread" -for ac_func in pthread_mutexattr_setprotocol pthread_condattr_setclock pthread_spin_lock fork +for ac_func in pthread_mutexattr_setprotocol \ + pthread_mutexattr_getprotocol \ + pthread_mutexattr_setrobust_np \ + pthread_condattr_getclock \ + pthread_condattr_setclock \ + pthread_spin_lock fork \ + pthread_attr_setaffinity_np \ + pthread_getattr_np \ + pthread_atfork \ + pthread_setname_np \ + sched_getcpu\ + clock_nanosleep do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -13759,6 +13770,16 @@ done LIBS="$save_LIBS" +ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock" +if test "x$ac_cv_func_pthread_condattr_setclock" = xyes; then : + +else + +$as_echo "#define CONFIG_XENO_COPPERPLATE_CLOCK_RESTRICTED 1" >>confdefs.h + +fi + + cat >>confdefs.h <<_ACEOF diff --git a/configure.ac b/configure.ac index 5f7d714..febcdfd 100644 --- a/configure.ac +++ b/configure.ac @@ -498,9 +498,35 @@ AC_CHECK_HEADERS(mqueue.h) dnl Check for presence of some routines we need save_LIBS="$LIBS" LIBS="$LIBS -lrt -lpthread" -AC_CHECK_FUNCS([pthread_mutexattr_setprotocol pthread_condattr_setclock pthread_spin_lock fork]) +AC_CHECK_FUNCS([pthread_mutexattr_setprotocol \ + pthread_mutexattr_getprotocol \ + pthread_mutexattr_setrobust_np \ + pthread_condattr_getclock \ + pthread_condattr_setclock \ + pthread_spin_lock fork \ + pthread_attr_setaffinity_np \ + pthread_getattr_np \ + pthread_atfork \ + pthread_setname_np \ + sched_getcpu\ + clock_nanosleep]) LIBS="$save_LIBS" +dnl If we can't set the clock for condvar timeouts, then +dnl we have to restrict the Copperplate clock to CLOCK_REALTIME. +dnl In effect this means that updating the host system date may affect +dnl wait times of blocking services. This is a provision for running +dnl over legacy threading libraries such as linuxthreads. +dnl +dnl CAUTION: the CLOCK_COPPERPLATE value is part of the ABI between +dnl the Xenomai core libraries and the applications. Therefore it shall +dnl remain stable even if applications depend on a different libc +dnl than Xenomai libraries were built against originally. Hence the +dnl built-in CONFIG_XENO_COPPERPLATE_CLOCK_RESTRICTED flag, which +dnl won't vary for a given Xenomai installation. +AC_CHECK_FUNC(pthread_condattr_setclock,, +[AC_DEFINE(CONFIG_XENO_COPPERPLATE_CLOCK_RESTRICTED, 1,[config])]) + dnl dnl Produce the info needed to build xeno_config.h dnl diff --git a/include/boilerplate/Makefile.am b/include/boilerplate/Makefi
[Xenomai-git] Philippe Gerum : copperplate/version: emit build setup information
Module: xenomai-forge Branch: next Commit: b76363a9d13a9eeffdfb5a6d41c3a738ab6efa3e URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=b76363a9d13a9eeffdfb5a6d41c3a738ab6efa3e Author: Philippe Gerum Date: Mon Aug 18 11:04:29 2014 +0200 copperplate/version: emit build setup information To make sure we can get this information from different sources easily, sbin/version will dump the build setup flags when -a or --all is given, in addition to the version stamp. --- Makefile.in |2 +- config/Makefile.in |2 +- configure| 12 configure.ac |8 demo/Makefile.in |2 +- demo/alchemy/Makefile.in |2 +- demo/alchemy/cobalt/Makefile.in |2 +- demo/posix/Makefile.in |2 +- demo/posix/cobalt/Makefile.in|2 +- doc/Makefile.in |2 +- doc/asciidoc/Makefile.in |2 +- doc/doxygen/Makefile.in |2 +- doc/gitdoc/Makefile.in |2 +- include/Makefile.in |2 +- include/alchemy/Makefile.in |2 +- include/boilerplate/Makefile.in |2 +- include/cobalt/Makefile.in |2 +- include/cobalt/boilerplate/Makefile.in |2 +- include/cobalt/kernel/Makefile.in|2 +- include/cobalt/kernel/rtdm/Makefile.in |2 +- include/cobalt/kernel/rtdm/analogy/Makefile.in |2 +- include/cobalt/sys/Makefile.in |2 +- include/cobalt/uapi/Makefile.in |2 +- include/cobalt/uapi/asm-generic/Makefile.in |2 +- include/cobalt/uapi/kernel/Makefile.in |2 +- include/cobalt/uapi/rtdm/Makefile.in |2 +- include/copperplate/Makefile.in |2 +- include/mercury/Makefile.in |2 +- include/mercury/boilerplate/Makefile.in |2 +- include/nocore/Makefile.in |2 +- include/psos/Makefile.in |2 +- include/rtdm/Makefile.in |2 +- include/rtdm/uapi/Makefile.in|2 +- include/smokey/Makefile.in |2 +- include/trank/Makefile.in|2 +- include/trank/native/Makefile.in |2 +- include/trank/posix/Makefile.in |2 +- include/trank/rtdm/Makefile.in |2 +- include/vxworks/Makefile.in |2 +- include/xeno_config.h.in |3 +++ lib/Makefile.in |2 +- lib/alchemy/Makefile.in |2 +- lib/analogy/Makefile.in |2 +- lib/boilerplate/Makefile.in |2 +- lib/cobalt/Makefile.in |2 +- lib/cobalt/arch/Makefile.in |2 +- lib/cobalt/arch/arm/Makefile.in |2 +- lib/cobalt/arch/arm/include/Makefile.in |2 +- lib/cobalt/arch/arm/include/asm/Makefile.in |2 +- lib/cobalt/arch/arm/include/asm/xenomai/Makefile.in |2 +- lib/cobalt/arch/blackfin/Makefile.in |2 +- lib/cobalt/arch/blackfin/include/Makefile.in |2 +- lib/cobalt/arch/blackfin/include/asm/Makefile.in |2 +- lib/cobalt/arch/blackfin/include/asm/xenomai/Makefile.in |2 +- lib/cobalt/arch/nios2/Makefile.in|2 +- lib/cobalt/arch/nios2/include/Makefile.in|2 +- lib/cobalt/arch/nios2/include/asm/Makefile.in|2 +- lib/cobalt/arch/nios2/include/asm/xenomai/Makefile.in|2 +- lib/cobalt/arch/powerpc/Makefile.in |2 +- lib/cobalt/arch/powerpc/include/Makefile.in |2 +- lib/cobalt/arch/powerpc/include/asm/Makefile.in |2 +- lib/cobalt/arch/powerpc/include/asm/xenomai/Makefile.in |2 +- lib/cobalt/arch/sh/Makefile.in |2 +- lib/cobalt/arch/sh/include/Makefile.in |2 +- lib/cobalt/arch/sh/include/asm/Makefile.in |2 +- lib/cobalt/arch/sh/include/asm/xenomai/Makefile.in |2 +- lib/
[Xenomai-git] Philippe Gerum : copperplate/version: emit build setup information
Module: xenomai-forge Branch: next Commit: f55f2fbe0f1efed45059301c3f331be0c7cbfb95 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=f55f2fbe0f1efed45059301c3f331be0c7cbfb95 Author: Philippe Gerum Date: Mon Aug 18 11:04:29 2014 +0200 copperplate/version: emit build setup information To make sure we can get this information from different sources easily, sbin/version will dump the build setup flags when -a or --all is given, in addition to the version stamp. --- Makefile.in |2 +- config/Makefile.in |2 +- configure| 12 configure.ac |8 demo/Makefile.in |2 +- demo/alchemy/Makefile.in |2 +- demo/alchemy/cobalt/Makefile.in |2 +- demo/posix/Makefile.in |2 +- demo/posix/cobalt/Makefile.in|2 +- doc/Makefile.in |2 +- doc/asciidoc/Makefile.in |2 +- doc/doxygen/Makefile.in |2 +- doc/gitdoc/Makefile.in |2 +- include/Makefile.in |2 +- include/alchemy/Makefile.in |2 +- include/boilerplate/Makefile.in |2 +- include/cobalt/Makefile.in |2 +- include/cobalt/boilerplate/Makefile.in |2 +- include/cobalt/kernel/Makefile.in|2 +- include/cobalt/kernel/rtdm/Makefile.in |2 +- include/cobalt/kernel/rtdm/analogy/Makefile.in |2 +- include/cobalt/sys/Makefile.in |2 +- include/cobalt/uapi/Makefile.in |2 +- include/cobalt/uapi/asm-generic/Makefile.in |2 +- include/cobalt/uapi/kernel/Makefile.in |2 +- include/cobalt/uapi/rtdm/Makefile.in |2 +- include/copperplate/Makefile.in |2 +- include/mercury/Makefile.in |2 +- include/mercury/boilerplate/Makefile.in |2 +- include/nocore/Makefile.in |2 +- include/psos/Makefile.in |2 +- include/rtdm/Makefile.in |2 +- include/rtdm/uapi/Makefile.in|2 +- include/smokey/Makefile.in |2 +- include/trank/Makefile.in|2 +- include/trank/native/Makefile.in |2 +- include/trank/posix/Makefile.in |2 +- include/trank/rtdm/Makefile.in |2 +- include/vxworks/Makefile.in |2 +- include/xeno_config.h.in |3 +++ lib/Makefile.in |2 +- lib/alchemy/Makefile.in |2 +- lib/analogy/Makefile.in |2 +- lib/boilerplate/Makefile.in |2 +- lib/cobalt/Makefile.in |2 +- lib/cobalt/arch/Makefile.in |2 +- lib/cobalt/arch/arm/Makefile.in |2 +- lib/cobalt/arch/arm/include/Makefile.in |2 +- lib/cobalt/arch/arm/include/asm/Makefile.in |2 +- lib/cobalt/arch/arm/include/asm/xenomai/Makefile.in |2 +- lib/cobalt/arch/blackfin/Makefile.in |2 +- lib/cobalt/arch/blackfin/include/Makefile.in |2 +- lib/cobalt/arch/blackfin/include/asm/Makefile.in |2 +- lib/cobalt/arch/blackfin/include/asm/xenomai/Makefile.in |2 +- lib/cobalt/arch/nios2/Makefile.in|2 +- lib/cobalt/arch/nios2/include/Makefile.in|2 +- lib/cobalt/arch/nios2/include/asm/Makefile.in|2 +- lib/cobalt/arch/nios2/include/asm/xenomai/Makefile.in|2 +- lib/cobalt/arch/powerpc/Makefile.in |2 +- lib/cobalt/arch/powerpc/include/Makefile.in |2 +- lib/cobalt/arch/powerpc/include/asm/Makefile.in |2 +- lib/cobalt/arch/powerpc/include/asm/xenomai/Makefile.in |2 +- lib/cobalt/arch/sh/Makefile.in |2 +- lib/cobalt/arch/sh/include/Makefile.in |2 +- lib/cobalt/arch/sh/include/asm/Makefile.in |2 +- lib/cobalt/arch/sh/include/asm/xenomai/Makefile.in |2 +- lib/
[Xenomai-git] Philippe Gerum : cobalt, mercury: enable glibc(NPTL), uClibc(NPTL/ linuxthreads) builds
Module: xenomai-forge Branch: next Commit: cc8b4c1ae00d9341e71a7a917056cbe447a36161 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=cc8b4c1ae00d9341e71a7a917056cbe447a36161 Author: Philippe Gerum Date: Sun Aug 17 11:55:31 2014 +0200 cobalt, mercury: enable glibc(NPTL), uClibc(NPTL/linuxthreads) builds We allow building the Xenomai libraries and programs against uClibc and glibc-based systems for both Cobalt and Mercury configurations. We cope with NPTL and legacy linuxthreads when building against the uClibc. We require NPTL for building against the glibc though. To this end, this patch moves all libc quirks to a separate header. --- configure| 23 +++- configure.ac | 28 +++- include/boilerplate/Makefile.am |1 + include/boilerplate/Makefile.in |1 + include/boilerplate/compiler.h |4 + include/boilerplate/libc.h | 180 ++ include/cobalt/pthread.h | 56 ++-- include/copperplate/clockobj.h | 44 ++- include/mercury/Makefile.am |2 + include/mercury/Makefile.in |8 +- include/mercury/pthread.h| 21 +++ include/xeno_config.h.in | 30 + lib/alchemy/mutex.c |3 +- lib/copperplate/clockobj.c |7 + lib/copperplate/syncobj.c|6 +- lib/copperplate/threadobj.c |5 +- lib/vxworks/semLib.c |3 +- testsuite/regression/posix/leaks.c |7 +- testsuite/smokey/cond-torture/cond-torture.c | 15 +-- 19 files changed, 373 insertions(+), 71 deletions(-) diff --git a/configure b/configure index 6a2d951..00e96e0 100755 --- a/configure +++ b/configure @@ -13745,7 +13745,18 @@ done save_LIBS="$LIBS" LIBS="$LIBS -lrt -lpthread" -for ac_func in pthread_mutexattr_setprotocol pthread_condattr_setclock pthread_spin_lock fork +for ac_func in pthread_mutexattr_setprotocol \ + pthread_mutexattr_getprotocol \ + pthread_mutexattr_setrobust_np \ + pthread_condattr_getclock \ + pthread_condattr_setclock \ + pthread_spin_lock fork \ + pthread_attr_setaffinity_np \ + pthread_getattr_np \ + pthread_atfork \ + pthread_setname_np \ + sched_getcpu\ + clock_nanosleep do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -13759,6 +13770,16 @@ done LIBS="$save_LIBS" +ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock" +if test "x$ac_cv_func_pthread_condattr_setclock" = xyes; then : + +else + +$as_echo "#define CONFIG_XENO_COPPERPLATE_CLOCK_RESTRICTED 1" >>confdefs.h + +fi + + cat >>confdefs.h <<_ACEOF diff --git a/configure.ac b/configure.ac index 5f7d714..febcdfd 100644 --- a/configure.ac +++ b/configure.ac @@ -498,9 +498,35 @@ AC_CHECK_HEADERS(mqueue.h) dnl Check for presence of some routines we need save_LIBS="$LIBS" LIBS="$LIBS -lrt -lpthread" -AC_CHECK_FUNCS([pthread_mutexattr_setprotocol pthread_condattr_setclock pthread_spin_lock fork]) +AC_CHECK_FUNCS([pthread_mutexattr_setprotocol \ + pthread_mutexattr_getprotocol \ + pthread_mutexattr_setrobust_np \ + pthread_condattr_getclock \ + pthread_condattr_setclock \ + pthread_spin_lock fork \ + pthread_attr_setaffinity_np \ + pthread_getattr_np \ + pthread_atfork \ + pthread_setname_np \ + sched_getcpu\ + clock_nanosleep]) LIBS="$save_LIBS" +dnl If we can't set the clock for condvar timeouts, then +dnl we have to restrict the Copperplate clock to CLOCK_REALTIME. +dnl In effect this means that updating the host system date may affect +dnl wait times of blocking services. This is a provision for running +dnl over legacy threading libraries such as linuxthreads. +dnl +dnl CAUTION: the CLOCK_COPPERPLATE value is part of the ABI between +dnl the Xenomai core libraries and the applications. Therefore it shall +dnl remain stable even if applications depend on a different libc +dnl than Xenomai libraries were built against originally. Hence the +dnl built-in CONFIG_XENO_COPPERPLATE_CLOCK_RESTRICTED flag, which +dnl won't vary for a given Xenomai installation. +AC_CHECK_FUNC(pthread_condattr_setclock,, +[AC_DEFINE(CONFIG_XENO_COPPERPLATE_CLOCK_RESTRICTED, 1,[config])]) + dnl dnl Produce the info needed to build xeno_config.h
[Xenomai-git] Philippe Gerum : lib/cobalt/blackfin: provide cobalt_read_tsc()
Module: xenomai-forge Branch: next Commit: e760c1926a7191b8a68f491d9207c84a4c24125a URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=e760c1926a7191b8a68f491d9207c84a4c24125a Author: Philippe Gerum Date: Sun Aug 17 11:13:41 2014 +0200 lib/cobalt/blackfin: provide cobalt_read_tsc() --- lib/cobalt/arch/blackfin/include/asm/xenomai/tsc.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cobalt/arch/blackfin/include/asm/xenomai/tsc.h b/lib/cobalt/arch/blackfin/include/asm/xenomai/tsc.h index ec3957c..2fa3782 100644 --- a/lib/cobalt/arch/blackfin/include/asm/xenomai/tsc.h +++ b/lib/cobalt/arch/blackfin/include/asm/xenomai/tsc.h @@ -18,7 +18,7 @@ #ifndef _LIB_COBALT_BLACKFIN_TSC_H #define _LIB_COBALT_BLACKFIN_TSC_H -static inline unsigned long long __xn_rdtsc (void) +static inline unsigned long long cobalt_read_tsc(void) { union { struct { ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : copperplate/version: emit build setup information
Module: xenomai-forge Branch: next Commit: f6efaa53ee5f37d429b3f0c55b895b0c058fb2bf URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=f6efaa53ee5f37d429b3f0c55b895b0c058fb2bf Author: Philippe Gerum Date: Mon Aug 18 11:04:29 2014 +0200 copperplate/version: emit build setup information To make sure we can get this information from different sources easily, sbin/version will dump the build setup flags when -a or --all is given, in addition to the version stamp. --- Makefile.in |2 +- config/Makefile.in |2 +- configure| 12 configure.ac |8 demo/Makefile.in |2 +- demo/alchemy/Makefile.in |2 +- demo/alchemy/cobalt/Makefile.in |2 +- demo/posix/Makefile.in |2 +- demo/posix/cobalt/Makefile.in|2 +- doc/Makefile.in |2 +- doc/asciidoc/Makefile.in |2 +- doc/doxygen/Makefile.in |2 +- doc/gitdoc/Makefile.in |2 +- include/Makefile.in |2 +- include/alchemy/Makefile.in |2 +- include/boilerplate/Makefile.in |2 +- include/cobalt/Makefile.in |2 +- include/cobalt/boilerplate/Makefile.in |2 +- include/cobalt/kernel/Makefile.in|2 +- include/cobalt/kernel/rtdm/Makefile.in |2 +- include/cobalt/kernel/rtdm/analogy/Makefile.in |2 +- include/cobalt/sys/Makefile.in |2 +- include/cobalt/uapi/Makefile.in |2 +- include/cobalt/uapi/asm-generic/Makefile.in |2 +- include/cobalt/uapi/kernel/Makefile.in |2 +- include/cobalt/uapi/rtdm/Makefile.in |2 +- include/copperplate/Makefile.in |2 +- include/mercury/Makefile.in |2 +- include/mercury/boilerplate/Makefile.in |2 +- include/nocore/Makefile.in |2 +- include/psos/Makefile.in |2 +- include/rtdm/Makefile.in |2 +- include/rtdm/uapi/Makefile.in|2 +- include/smokey/Makefile.in |2 +- include/trank/Makefile.in|2 +- include/trank/native/Makefile.in |2 +- include/trank/posix/Makefile.in |2 +- include/trank/rtdm/Makefile.in |2 +- include/vxworks/Makefile.in |2 +- include/xeno_config.h.in |3 +++ lib/Makefile.in |2 +- lib/alchemy/Makefile.in |2 +- lib/analogy/Makefile.in |2 +- lib/boilerplate/Makefile.in |2 +- lib/cobalt/Makefile.in |2 +- lib/cobalt/arch/Makefile.in |2 +- lib/cobalt/arch/arm/Makefile.in |2 +- lib/cobalt/arch/arm/include/Makefile.in |2 +- lib/cobalt/arch/arm/include/asm/Makefile.in |2 +- lib/cobalt/arch/arm/include/asm/xenomai/Makefile.in |2 +- lib/cobalt/arch/blackfin/Makefile.in |2 +- lib/cobalt/arch/blackfin/include/Makefile.in |2 +- lib/cobalt/arch/blackfin/include/asm/Makefile.in |2 +- lib/cobalt/arch/blackfin/include/asm/xenomai/Makefile.in |2 +- lib/cobalt/arch/nios2/Makefile.in|2 +- lib/cobalt/arch/nios2/include/Makefile.in|2 +- lib/cobalt/arch/nios2/include/asm/Makefile.in|2 +- lib/cobalt/arch/nios2/include/asm/xenomai/Makefile.in|2 +- lib/cobalt/arch/powerpc/Makefile.in |2 +- lib/cobalt/arch/powerpc/include/Makefile.in |2 +- lib/cobalt/arch/powerpc/include/asm/Makefile.in |2 +- lib/cobalt/arch/powerpc/include/asm/xenomai/Makefile.in |2 +- lib/cobalt/arch/sh/Makefile.in |2 +- lib/cobalt/arch/sh/include/Makefile.in |2 +- lib/cobalt/arch/sh/include/asm/Makefile.in |2 +- lib/cobalt/arch/sh/include/asm/xenomai/Makefile.in |2 +- lib/
[Xenomai-git] Philippe Gerum : cobalt, mercury: enable glibc(NPTL), uClibc(NPTL/ linuxthreads) builds
Module: xenomai-forge Branch: next Commit: 0bb29b49adade2a3a39972bbfa20ae88635c8fc7 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=0bb29b49adade2a3a39972bbfa20ae88635c8fc7 Author: Philippe Gerum Date: Sun Aug 17 11:55:31 2014 +0200 cobalt, mercury: enable glibc(NPTL), uClibc(NPTL/linuxthreads) builds We allow building the Xenomai libraries and programs against uClibc and glibc-based systems for both Cobalt and Mercury configurations. We cope with NPTL and legacy linuxthreads when building against the uClibc. We require NPTL for building against the glibc though. To this end, this patch moves all libc quirks to a separate header. --- configure| 23 +++- configure.ac | 28 +++- include/boilerplate/Makefile.am |1 + include/boilerplate/Makefile.in |1 + include/boilerplate/compiler.h |4 + include/boilerplate/libc.h | 180 ++ include/cobalt/pthread.h | 56 ++-- include/copperplate/clockobj.h | 20 ++- include/mercury/Makefile.am |2 + include/mercury/Makefile.in |8 +- include/mercury/pthread.h| 21 +++ include/xeno_config.h.in | 30 + lib/alchemy/mutex.c |3 +- lib/copperplate/syncobj.c|6 +- lib/copperplate/threadobj.c |5 +- lib/vxworks/semLib.c |3 +- testsuite/regression/posix/leaks.c |7 +- testsuite/smokey/cond-torture/cond-torture.c | 15 +-- 18 files changed, 342 insertions(+), 71 deletions(-) diff --git a/configure b/configure index 6a2d951..00e96e0 100755 --- a/configure +++ b/configure @@ -13745,7 +13745,18 @@ done save_LIBS="$LIBS" LIBS="$LIBS -lrt -lpthread" -for ac_func in pthread_mutexattr_setprotocol pthread_condattr_setclock pthread_spin_lock fork +for ac_func in pthread_mutexattr_setprotocol \ + pthread_mutexattr_getprotocol \ + pthread_mutexattr_setrobust_np \ + pthread_condattr_getclock \ + pthread_condattr_setclock \ + pthread_spin_lock fork \ + pthread_attr_setaffinity_np \ + pthread_getattr_np \ + pthread_atfork \ + pthread_setname_np \ + sched_getcpu\ + clock_nanosleep do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -13759,6 +13770,16 @@ done LIBS="$save_LIBS" +ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock" +if test "x$ac_cv_func_pthread_condattr_setclock" = xyes; then : + +else + +$as_echo "#define CONFIG_XENO_COPPERPLATE_CLOCK_RESTRICTED 1" >>confdefs.h + +fi + + cat >>confdefs.h <<_ACEOF diff --git a/configure.ac b/configure.ac index 5f7d714..febcdfd 100644 --- a/configure.ac +++ b/configure.ac @@ -498,9 +498,35 @@ AC_CHECK_HEADERS(mqueue.h) dnl Check for presence of some routines we need save_LIBS="$LIBS" LIBS="$LIBS -lrt -lpthread" -AC_CHECK_FUNCS([pthread_mutexattr_setprotocol pthread_condattr_setclock pthread_spin_lock fork]) +AC_CHECK_FUNCS([pthread_mutexattr_setprotocol \ + pthread_mutexattr_getprotocol \ + pthread_mutexattr_setrobust_np \ + pthread_condattr_getclock \ + pthread_condattr_setclock \ + pthread_spin_lock fork \ + pthread_attr_setaffinity_np \ + pthread_getattr_np \ + pthread_atfork \ + pthread_setname_np \ + sched_getcpu\ + clock_nanosleep]) LIBS="$save_LIBS" +dnl If we can't set the clock for condvar timeouts, then +dnl we have to restrict the Copperplate clock to CLOCK_REALTIME. +dnl In effect this means that updating the host system date may affect +dnl wait times of blocking services. This is a provision for running +dnl over legacy threading libraries such as linuxthreads. +dnl +dnl CAUTION: the CLOCK_COPPERPLATE value is part of the ABI between +dnl the Xenomai core libraries and the applications. Therefore it shall +dnl remain stable even if applications depend on a different libc +dnl than Xenomai libraries were built against originally. Hence the +dnl built-in CONFIG_XENO_COPPERPLATE_CLOCK_RESTRICTED flag, which +dnl won't vary for a given Xenomai installation. +AC_CHECK_FUNC(pthread_condattr_setclock,, +[AC_DEFINE(CONFIG_XENO_COPPERPLATE_CLOCK_RESTRICTED, 1,[config])]) + dnl dnl Produce the info needed to build xeno_config.h dnl diff --git a/include/boilerplate/Makefile.am b/include/
[Xenomai-git] Philippe Gerum : copperplate, trank: omit clock spec for condvar when useless
Module: xenomai-forge Branch: next Commit: 47bae8faa5c270d61cce8f36ef757fb5add0ab77 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=47bae8faa5c270d61cce8f36ef757fb5add0ab77 Author: Philippe Gerum Date: Sun Aug 17 17:57:28 2014 +0200 copperplate, trank: omit clock spec for condvar when useless --- lib/copperplate/threadobj.c |1 - lib/copperplate/traceobj.c |1 - lib/trank/native.c |1 - 3 files changed, 3 deletions(-) diff --git a/lib/copperplate/threadobj.c b/lib/copperplate/threadobj.c index bccf306..462eb1e 100644 --- a/lib/copperplate/threadobj.c +++ b/lib/copperplate/threadobj.c @@ -981,7 +981,6 @@ int threadobj_init(struct threadobj *thobj, pthread_condattr_init(&cattr); pthread_condattr_setpshared(&cattr, mutex_scope_attribute); - pthread_condattr_setclock(&cattr, CLOCK_COPPERPLATE); ret = __bt(-__RT(pthread_cond_init(&thobj->barrier, &cattr))); pthread_condattr_destroy(&cattr); if (ret) { diff --git a/lib/copperplate/traceobj.c b/lib/copperplate/traceobj.c index 280bf4c..08fde68 100644 --- a/lib/copperplate/traceobj.c +++ b/lib/copperplate/traceobj.c @@ -59,7 +59,6 @@ int traceobj_init(struct traceobj *trobj, const char *label, int nr_marks) pthread_condattr_init(&cattr); pthread_condattr_setpshared(&cattr, PTHREAD_PROCESS_PRIVATE); - pthread_condattr_setclock(&cattr, CLOCK_COPPERPLATE); ret = __bt(-__RT(pthread_cond_init(&trobj->join, &cattr))); pthread_condattr_destroy(&cattr); if (ret) { diff --git a/lib/trank/native.c b/lib/trank/native.c index 9df5210..5c9f834 100644 --- a/lib/trank/native.c +++ b/lib/trank/native.c @@ -350,7 +350,6 @@ int rt_alarm_create(RT_ALARM *alarm, const char *name) pthread_condattr_init(&cattr); pthread_condattr_setpshared(&cattr, PTHREAD_PROCESS_PRIVATE); - pthread_condattr_setclock(&cattr, CLOCK_COPPERPLATE); ret = __bt(-pthread_cond_init(&aw->event, &cattr)); pthread_condattr_destroy(&cattr); if (ret) ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git