comparison src/os/win32/ngx_os_thread.c @ 44:0e81ac0bb3e2

nginx-0.0.1-2003-01-09-08:36:00 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 09 Jan 2003 05:36:00 +0000
parents
children
comparison
equal deleted inserted replaced
43:53cd05892261 44:0e81ac0bb3e2
1
2
3 #include <ngx_config.h>
4
5 #include <ngx_log.h>
6 #include <ngx_os_thread.h>
7
8
9 int ngx_create_os_thread(ngx_os_tid_t *tid, void *stack,
10 ngx_thread_start_routine_t func, void *arg,
11 ngx_log_t log)
12 {
13 ngx_os_tid_t id;
14 int dummy; /* needed in Win9X only, in NT can be NULL */
15
16 id = CreateThread(NULL, stack_size, func, arg, 0, &dummy);
17
18 if (id == NULL) {
19 ngx_log_error(NGX_LOG_ERR, log, err, "CreateThread() failed");
20 return NGX_ERROR;
21 }
22
23 *tid = id;
24
25 return NGX_OK;
26 }