summaryrefslogtreecommitdiff
path: root/threadproc/os2/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'threadproc/os2/thread.c')
-rw-r--r--threadproc/os2/thread.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/threadproc/os2/thread.c b/threadproc/os2/thread.c
index d9cc23210..24b29f680 100644
--- a/threadproc/os2/thread.c
+++ b/threadproc/os2/thread.c
@@ -33,6 +33,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new, apr_pool
(*new)->pool = pool;
(*new)->attr = 0;
+ (*new)->stacksize = 0;
return APR_SUCCESS;
}
@@ -51,7 +52,12 @@ APR_DECLARE(apr_status_t) apr_threadattr_detach_get(apr_threadattr_t *attr)
return (attr->attr & APR_THREADATTR_DETACHED) ? APR_DETACH : APR_NOTDETACH;
}
-
+APR_DECLARE(apr_status_t) apr_threadattr_stacksize_set(apr_threadattr_t *attr,
+ apr_size_t stacksize)
+{
+ attr->stacksize = stacksize;
+ return APR_SUCCESS;
+}
static void apr_thread_begin(void *arg)
{
@@ -94,7 +100,9 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new, apr_threadattr_t
}
thread->tid = _beginthread(apr_thread_begin, NULL,
- APR_THREAD_STACKSIZE, thread);
+ thread->attr->stacksize > 0 ?
+ thread->attr->stacksize : APR_THREAD_STACKSIZE,
+ thread);
if (thread->tid < 0) {
return errno;