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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Aug 24 11:53:50 2015 +0200

copperplate/internal: enforce default stack size as minimum

Copperplate threads must be given at least PTHREAD_STACK_DEFAULT bytes
of stack.

---

 lib/copperplate/internal.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/copperplate/internal.c b/lib/copperplate/internal.c
index d202a41..7f712de 100644
--- a/lib/copperplate/internal.c
+++ b/lib/copperplate/internal.c
@@ -53,8 +53,8 @@ int copperplate_create_thread(struct corethread_attributes 
*cta,
                return __bt(ret);
 
        stacksize = cta->stacksize;
-       if (stacksize < PTHREAD_STACK_MIN * 4)
-               stacksize = PTHREAD_STACK_MIN * 4;
+       if (stacksize < PTHREAD_STACK_DEFAULT)
+               stacksize = PTHREAD_STACK_DEFAULT;
 
        pthread_attr_init_ex(&attr_ex);
        pthread_attr_setinheritsched_ex(&attr_ex, PTHREAD_INHERIT_SCHED);
@@ -120,8 +120,8 @@ int copperplate_create_thread(struct corethread_attributes 
*cta,
                return __bt(ret);
 
        stacksize = cta->stacksize;
-       if (stacksize < PTHREAD_STACK_MIN * 4)
-               stacksize = PTHREAD_STACK_MIN * 4;
+       if (stacksize < PTHREAD_STACK_DEFAULT)
+               stacksize = PTHREAD_STACK_DEFAULT;
 
        pthread_attr_init(&attr);
        pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);


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

Reply via email to