Module: xenomai-3
Branch: arm64
Commit: e44620495d0b8f0d029250b44dfeef4a47dcd155

Author: Philippe Gerum <>
Date:   Thu Oct 15 09:59:21 2015 +0200

copperplate/regd: do not involve Cobalt before binding is done

Some early code in sysregd wants to set the regular scheduling policy
of the main thread prior to binding to the Cobalt core manually. Make
sure to force a libc call for this, instead of going through a Cobalt
syscall first.

Functionally speaking, the effect will be the same since
pthread_setschedparam() mirrors the request to the regular C library,
which is what we'll need eventually. However we won't receive the
scary warning about a syscall being denied for an unbound process from
the Cobalt core when debug mode is enabled, e.g.:

[Xenomai] syscall <7> denied to sysregd[22217]


 lib/copperplate/regd/regd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/copperplate/regd/regd.c b/lib/copperplate/regd/regd.c
index 25bd7a5..5d69d83 100644
--- a/lib/copperplate/regd/regd.c
+++ b/lib/copperplate/regd/regd.c
@@ -538,7 +538,7 @@ int main(int argc, char *const *argv)
        /* Force SCHED_OTHER. */
        schedp.sched_priority = 0;
-       pthread_setschedparam(pthread_self(), SCHED_OTHER, &schedp);
+       __STD(pthread_setschedparam(pthread_self(), SCHED_OTHER, &schedp));
        memset(&sa, 0, sizeof(sa));
        sa.sa_handler = SIG_IGN;

Xenomai-git mailing list

Reply via email to