summaryrefslogtreecommitdiffstats
path: root/cpukit/posix
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-10 07:11:29 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-10 07:11:29 +0200
commit8c5267a268ae8ce599e61d0e1bdff585e26187c5 (patch)
treec00239d975a66c59b49c7515c76db71692c04dee /cpukit/posix
parentposix: Remove rtems_pthread_attribute_compare() (diff)
downloadrtems-8c5267a268ae8ce599e61d0e1bdff585e26187c5.tar.bz2
posix: Simplify pthread_attr_setstack()
Simplify * pthread_attr_setstack(), and * pthread_attr_setstacksize(). Update #2514.
Diffstat (limited to 'cpukit/posix')
-rw-r--r--cpukit/posix/src/pthreadattrsetstack.c9
-rw-r--r--cpukit/posix/src/pthreadattrsetstacksize.c8
2 files changed, 2 insertions, 15 deletions
diff --git a/cpukit/posix/src/pthreadattrsetstack.c b/cpukit/posix/src/pthreadattrsetstack.c
index 3f62247741..b335274d92 100644
--- a/cpukit/posix/src/pthreadattrsetstack.c
+++ b/cpukit/posix/src/pthreadattrsetstack.c
@@ -22,9 +22,6 @@
#if HAVE_DECL_PTHREAD_ATTR_SETSTACK
-#include <rtems/posix/pthreadimpl.h>
-#include <rtems/score/stackimpl.h>
-
#include <pthread.h>
#include <errno.h>
@@ -37,11 +34,7 @@ int pthread_attr_setstack(
if ( !attr || !attr->is_initialized )
return EINVAL;
- if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
- attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
- else
- attr->stacksize = stacksize;
-
+ attr->stacksize = stacksize;
attr->stackaddr = stackaddr;
return 0;
}
diff --git a/cpukit/posix/src/pthreadattrsetstacksize.c b/cpukit/posix/src/pthreadattrsetstacksize.c
index 4dae0f359e..b54531daae 100644
--- a/cpukit/posix/src/pthreadattrsetstacksize.c
+++ b/cpukit/posix/src/pthreadattrsetstacksize.c
@@ -20,9 +20,6 @@
#include "config.h"
#endif
-#include <rtems/posix/pthreadimpl.h>
-#include <rtems/score/stackimpl.h>
-
#include <pthread.h>
#include <errno.h>
@@ -34,9 +31,6 @@ int pthread_attr_setstacksize(
if ( !attr || !attr->is_initialized )
return EINVAL;
- if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
- attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
- else
- attr->stacksize = stacksize;
+ attr->stacksize = stacksize;
return 0;
}