Passing SCHED_RR as policy to pthread_create has currently not the
desired effect. The kernel part expects that user space adjusts the
policy and prio via __pse51_thread_setschedparam after setting up the
shadow. And this is what the patch does by calling the wrapped
pthread_setschedparam instead of the real one.

Signed-off-by: Jan Kiszka <>

 src/skins/posix/thread.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/skins/posix/thread.c b/src/skins/posix/thread.c
index 1544291..2ecb64f 100644
--- a/src/skins/posix/thread.c
+++ b/src/skins/posix/thread.c
@@ -162,7 +162,7 @@ static void *__pthread_trampoline(void *arg)
                /* Broken pthread libs ignore some of the thread attribute specs
                   passed to pthread_create(3), so we force the scheduling 
                   once again here. */
-               __real_pthread_setschedparam(tid, policy, &param);
+               __wrap_pthread_setschedparam(tid, policy, &param);
                /* If the thread running pthread_create runs with the same
                   priority as us, we should leave it running, as if there never

Xenomai-core mailing list

Reply via email to