summaryrefslogtreecommitdiff
path: root/attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'attr.c')
-rw-r--r--attr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/attr.c b/attr.c
index fa7de12..84c35a5 100644
--- a/attr.c
+++ b/attr.c
@@ -84,7 +84,7 @@ pthread_attr_setstacksize(pthread_attr_t *attr,
{
#ifdef _POSIX_THREAD_ATTR_STACKSIZE
- /* Verify that the stack size is within range. */
+ /* Verify that the stack size is within range. */
if (stacksize < PTHREAD_STACK_MIN)
{
return EINVAL;
@@ -324,7 +324,12 @@ pthread_attr_init(pthread_attr_t *attr)
}
#ifdef _POSIX_THREAD_ATTR_STACKSIZE
- attr_result->stacksize = PTHREAD_STACK_MIN;
+ /*
+ * Default to zero size. Unless changed explicitly this
+ * will allow Win32 to set the size to that of the
+ * main thread.
+ */
+ attr_result->stacksize = 0;
#endif
#ifdef _POSIX_THREAD_ATTR_STACKADDR