Module: xenomai-jki
Branch: for-upstream
Commit: 4267625909c441affac187c3b05adab071c1f65e
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=4267625909c441affac187c3b05adab071c1f65e

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Tue Mar  2 20:06:56 2010 +0100

testsuite: Fix posix mutex test for non-auto-shadow setups

sched_setscheduler is not wrapped by the POSIX skin, only
pthread_setschedparam. So the main thread of the test remained
unshadowed of auto-shadowing was disabled.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 src/testsuite/unit/mutex-torture.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/testsuite/unit/mutex-torture.c 
b/src/testsuite/unit/mutex-torture.c
index 70bda14..ebdd4f2 100644
--- a/src/testsuite/unit/mutex-torture.c
+++ b/src/testsuite/unit/mutex-torture.c
@@ -657,7 +657,7 @@ int main(void)
        /* Set scheduling parameters for the current process */
 #ifdef XENO_POSIX
        sparam.sched_priority = 2;
-       sched_setscheduler(0, SCHED_FIFO, &sparam);
+       pthread_setschedparam(pthread_self(), SCHED_FIFO, &sparam);
 #else /* __NATIVE_SKIN__ */
        rt_task_shadow(&main_tid, "main_task", 2, 0);
 #endif /* __NATIVE_SKIN__ */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to