*/
#define AP_MPM_WANT_SET_MAX_REQUESTS
#define AP_MPM_WANT_SET_MAX_MEM_FREE
+#define AP_MPM_WANT_SET_STACKSIZE
#define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
/*#define AP_MPM_WANT_SET_COREDUMPDIR
#define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
#define MPM_NOTE_CHILD_KILLED(i) (MPM_CHILD_PID(i) = 0)
extern int ap_threads_per_child;
-extern int ap_thread_stack_size;
extern int ap_max_workers_limit;
extern server_rec *ap_server_conf;
/* config globals */
int ap_threads_per_child=0; /* Worker threads per child */
-int ap_thread_stack_size=65536;
static int ap_threads_to_start=0;
static int ap_threads_min_free=0;
static int ap_threads_max_free=0;
ap_update_child_status_from_indexes(0, slot, WORKER_STARTING,
(request_rec *) NULL);
- if (ctx = NXContextAlloc((void (*)(void *)) worker_main, (void*)slot, NX_PRIO_MED, ap_thread_stack_size, NX_CTX_NORMAL, &err)) {
+ if (ctx = NXContextAlloc((void (*)(void *)) worker_main, (void*)slot, NX_PRIO_MED, ap_thread_stacksize, NX_CTX_NORMAL, &err)) {
char threadName[32];
sprintf (threadName, "Apache_Worker %d", slot);
ap_threads_limit = HARD_THREAD_LIMIT;
ap_max_requests_per_child = DEFAULT_MAX_REQUESTS_PER_CHILD;
ap_extended_status = 0;
+ ap_thread_stacksize = DEFAULT_THREAD_STACKSIZE;
#ifdef AP_MPM_WANT_SET_MAX_MEM_FREE
ap_max_mem_free = APR_ALLOCATOR_MAX_FREE_UNLIMITED;
#endif
return NULL;
}
-static const char *set_thread_stacksize(cmd_parms *cmd, void *dummy,
- const char *arg)
-{
- const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
- if (err != NULL) {
- return err;
- }
-
- ap_thread_stack_size = atoi(arg);
- return NULL;
-}
-
static const command_rec netware_mpm_cmds[] = {
-AP_INIT_TAKE1("ThreadStackSize", set_thread_stacksize, NULL, RSRC_CONF,
- "Stack size each created thread will use."),
LISTEN_COMMANDS,
AP_INIT_TAKE1("StartThreads", set_threads_to_start, NULL, RSRC_CONF,
"Number of worker threads launched at server startup"),