}
-static void win9x_accept(void * dummy)
+static unsigned int __stdcall win9x_accept(void * dummy)
{
struct timeval tv;
fd_set main_fds;
}
}
SetEvent(exit_event);
+ return 0;
}
* connections to service.
*/
#define MAX_ACCEPTEX_ERR_COUNT 250
-static void winnt_accept(void *lr_)
+static unsigned int __stdcall winnt_accept(void *lr_)
{
ap_listen_rec *lr = (ap_listen_rec *)lr_;
apr_os_sock_info_t sockinfo;
}
ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf,
"Child %d: Accept thread exiting.", my_pid);
+ return 0;
}
* Main entry point for the worker threads. Worker threads block in
* win*_get_connection() awaiting a connection to service.
*/
-static void worker_main(long thread_num)
+static unsigned int __stdcall worker_main(void *thread_num_val)
{
static int requests_this_child = 0;
PCOMP_CONTEXT context = NULL;
+ int thread_num = (int)thread_num_val;
ap_sb_handle_t *sbh;
ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf,
ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf,
"Child %d: Worker thread %ld exiting.", my_pid, thread_num);
+ return 0;
}
int tid;
int num_listeners = 0;
if (!use_acceptex) {
- _beginthreadex(NULL, 0, (LPTHREAD_START_ROUTINE) win9x_accept,
+ _beginthreadex(NULL, 0, win9x_accept,
NULL, 0, &tid);
} else {
/* Start an accept thread per listener
/* Now start a thread per listener */
for (lr = ap_listeners; lr; lr = lr->next) {
if (lr->sd != NULL) {
- _beginthreadex(NULL, 1000, (LPTHREAD_START_ROUTINE) winnt_accept,
+ _beginthreadex(NULL, 1000, winnt_accept,
(void *) lr, 0, &tid);
}
}
continue;
}
ap_update_child_status_from_indexes(0, i, SERVER_STARTING, NULL);
- child_handles[i] = (HANDLE) _beginthreadex(NULL, 0, (LPTHREAD_START_ROUTINE) worker_main,
+ child_handles[i] = (HANDLE) _beginthreadex(NULL, 0, worker_main,
(void *) i, 0, &tid);
if (child_handles[i] == 0) {
ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,