Module: xenomai-jki
Branch: for-forge
Commit: 55385e50da3f396f7fe2953aef27c09d7411c53e
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=55385e50da3f396f7fe2953aef27c09d7411c53e

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Tue Apr 21 21:07:52 2015 +0200

lib/cobalt: Fault in PTHREAD_STACK_MIN for the main thread

cobalt_get_stacksize(1) adds an extra page, but we do not know the size
of the main thread's stack anyway.

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

---

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

diff --git a/lib/cobalt/thread.c b/lib/cobalt/thread.c
index 0a2bf1a..016a490 100644
--- a/lib/cobalt/thread.c
+++ b/lib/cobalt/thread.c
@@ -52,7 +52,7 @@ static int std_maxpri;
 static void commit_stack_memory(void)
 {
        if (pthread_self() == __cobalt_main_ptid) {
-               char stk[cobalt_get_stacksize(1)];
+               char stk[PTHREAD_STACK_MIN];
                cobalt_commit_memory(stk);
        }
 }


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to