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

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

lib/cobalt: Remove minimum stack adjustment

The silent adjustment breaks when the user specifies a stack address.
Better recommend the default size as lower limit, specifically as the
current minimum is already too small in case Xenomai reports any errors
or warnings.

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

---

 doc/asciidoc/MIGRATION.adoc |    4 ++--
 lib/cobalt/thread.c         |    3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/doc/asciidoc/MIGRATION.adoc b/doc/asciidoc/MIGRATION.adoc
index 05a3cca..1dbb00c 100644
--- a/doc/asciidoc/MIGRATION.adoc
+++ b/doc/asciidoc/MIGRATION.adoc
@@ -1351,8 +1351,8 @@ out the delayed Xenomai thread indefinitely.
 === Thread management ===
 
 - The default POSIX thread stack size was raised to
-  `PTHREAD_STACK_MIN * 4`. The minimum stack size enforced by the
-  +libcobalt+ library is `PTHREAD_STACK_MIN + getpagesize()`.
+  `PTHREAD_STACK_MIN * 4`. It is strongly recommended to not shrink
+  the stack below this value for stability reasons.
 
 - pthread_set_name_np() has been renamed to pthread_setname_np() with
   the same arguments, to conform with the GNU extension equivalent.
diff --git a/lib/cobalt/thread.c b/lib/cobalt/thread.c
index 8d16ceb..0a2bf1a 100644
--- a/lib/cobalt/thread.c
+++ b/lib/cobalt/thread.c
@@ -182,7 +182,6 @@ int pthread_create_ex(pthread_t *ptid_r,
        struct timespec timeout;
        pthread_attr_t attr;
        pthread_t lptid;
-       size_t stksz;
 
        if (attr_ex == NULL)
                attr_ex = &default_attr_ex;
@@ -216,8 +215,6 @@ int pthread_create_ex(pthread_t *ptid_r,
                pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
 
        pthread_attr_getdetachstate(&attr, &detachstate);
-       pthread_attr_getstacksize(&attr, &stksz);
-       pthread_attr_setstacksize(&attr, cobalt_get_stacksize(stksz));
        pthread_attr_getpersonality_ex(attr_ex, &iargs.personality);
 
        /*


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

Reply via email to