Module: xenomai-3
Branch: arm64
Commit: e4ac28083d72d4cc058f952324be472d2d4b834f
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=e4ac28083d72d4cc058f952324be472d2d4b834f

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Aug 24 12:04:31 2015 +0200

lib/cobalt: update default stack size in thread attribute

---

 lib/cobalt/attr.c     |    2 +-
 lib/cobalt/init.c     |    2 +-
 lib/cobalt/internal.h |    2 --
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/cobalt/attr.c b/lib/cobalt/attr.c
index fcb94ff..586de92 100644
--- a/lib/cobalt/attr.c
+++ b/lib/cobalt/attr.c
@@ -26,7 +26,7 @@
 COBALT_IMPL(int, pthread_attr_init, (pthread_attr_t *attr))
 {
        __STD(pthread_attr_init)(attr);
-       return pthread_attr_setstacksize(attr, COBALT_STACKSIZE_DEFAULT);
+       return pthread_attr_setstacksize(attr, PTHREAD_STACK_DEFAULT);
 }
 
 int pthread_attr_init_ex(pthread_attr_ex_t *attr_ex)
diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c
index 4fde805..074d563 100644
--- a/lib/cobalt/init.c
+++ b/lib/cobalt/init.c
@@ -178,7 +178,7 @@ static void __cobalt_init(void)
 
 static inline void commit_stack_memory(void)
 {
-       char stk[PTHREAD_STACK_MIN];
+       char stk[PTHREAD_STACK_MIN / 2];
        cobalt_commit_memory(stk);
 }
 
diff --git a/lib/cobalt/internal.h b/lib/cobalt/internal.h
index b0f1019..df7d416 100644
--- a/lib/cobalt/internal.h
+++ b/lib/cobalt/internal.h
@@ -23,8 +23,6 @@
 #include <boilerplate/ancillaries.h>
 #include "current.h"
 
-#define COBALT_STACKSIZE_DEFAULT       (PTHREAD_STACK_MIN * 4)
-
 extern void *cobalt_umm_private;
 
 extern void *cobalt_umm_shared;


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

Reply via email to