cobalt/posix/sem: fix error path on failed creation
testsuite/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.kiszka@siemens.com>
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.kiszka@siemens.com>
cobalt/syscall: Add missing prefix to sc_cobalt_check_init

Pure cosmetic, no functional change.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
cobalt/thread: 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.kiszka@siemens.com>
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.kiszka@siemens.com>
cobalt/thread: 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.kiszka@siemens.com>
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.kiszka@siemens.com>
scripts: Provide "native" alias in xeno-config

This helps migrating from Xenomai 2.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
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.hillier@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
doc: regenerate documentation
cobalt/arm: fix compilation warning
testsuite: add select+mq test
cobalt: wrap the glibc function pthread_setname_np

as an alias of pthread_set_name_np
cobalt/timer: return overruns on 64 bits
switchtest: avoid printf stack overflow
cobalt/timer: make timer_id per-process instead of global
cobalt/arm: fix VFP related lockup

Running Xenomai compiled with HW FPU support on a processor without VFP
causes a lockup. Remedy that by testing at run-time whether the processor
supports VFP before using VFP instructions.

Use CONFIG_JUMP_LABEL to make the check as lightweight as possible.
cobalt: replace ppd mechanism

Store the pointer to ppds in the ipipe_threadinfo structure in order to
avoid the hash lookup most of the time.
cobalt: add xnid, rbtree based per-process ids table

To be used by named semaphores and file descriptors.