--- threadproc/win32/thread.c Fri Apr 4 04:46:46 2003
+++ threadproc/win32/thread.c.new Fri Apr 4 04:42:45 2003
@@ -77,9 +77,22 @@
}
(*new)->pool = pool;
+ (*new)->stack_size = APR_DEFAULT_STACK_SIZE;
return APR_SUCCESS;
}
+APR_DECLARE(apr_status_t) apr_threadattr_stacksize_set(apr_threadattr_t
*attr,
+ apr_size_t
size_in_bytes)
+{
+ attr->stack_size = size_in_bytes;
+}
+
+APR_DECLARE(apr_status_t) apr_threadattr_stacksize_get(apr_threadattr_t
*attr,
+ apr_size_t
*size_in_bytes)
+{
+ *size_in_bytes = attr->stack_size;
+}
+
APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t
*attr,
apr_int32_t on)
{
@@ -128,13 +141,13 @@
* same size as the calling thread.
*/
#ifndef _WIN32_WCE
- if (((*new)->td = (HANDLE)_beginthreadex(NULL, 0,
+ if (((*new)->td = (HANDLE)_beginthreadex(NULL, attr->stack_size,
(unsigned int (APR_THREAD_FUNC *)(void
*))dummy_worker,
(*new), 0, &temp)) == 0) {
return APR_FROM_OS_ERROR(_doserrno);
}
#else
- if (((*new)->td = CreateThread(NULL, 0,
+ if (((*new)->td = CreateThread(NULL, attr->stack_size,
(unsigned int (APR_THREAD_FUNC *)(void
*))dummy_worker,
(*new), 0, &temp)) == 0) {
return apr_get_os_error();