comparison src/os/win32/ngx_thread.c @ 2725:d43d73277c5c

Win32 master/workers model
author Igor Sysoev <igor@sysoev.ru>
date Mon, 20 Apr 2009 06:08:47 +0000
parents 9c2f3ed7a247
children d620f497c50f
comparison
equal deleted inserted replaced
2724:9fd2f12fee0a 2725:d43d73277c5c
16 16
17 ngx_err_t 17 ngx_err_t
18 ngx_create_thread(ngx_tid_t *tid, 18 ngx_create_thread(ngx_tid_t *tid,
19 ngx_thread_value_t (__stdcall *func)(void *arg), void *arg, ngx_log_t *log) 19 ngx_thread_value_t (__stdcall *func)(void *arg), void *arg, ngx_log_t *log)
20 { 20 {
21 u_long id;
21 ngx_err_t err; 22 ngx_err_t err;
22 23
23 *tid = CreateThread(NULL, stack_size, func, arg, 0, NULL); 24 *tid = CreateThread(NULL, stack_size, func, arg, 0, &id);
24 25
25 if (*tid != NULL) { 26 if (*tid != NULL) {
27 ngx_log_error(NGX_LOG_NOTICE, log, 0,
28 "create thread " NGX_TID_T_FMT, id);
26 return 0; 29 return 0;
27 } 30 }
28 31
29 err = ngx_errno; 32 err = ngx_errno;
30 ngx_log_error(NGX_LOG_ALERT, log, err, "CreateThread() failed"); 33 ngx_log_error(NGX_LOG_ALERT, log, err, "CreateThread() failed");